PATH:
root
/
quiz
<!doctype html> <html lang="pl"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Quziz</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&&display=swap" rel="stylesheet"> <link rel="stylesheet" href="css/style.css"> </head> <body> <main id="content" role="main" class="content"> <div class="quiz-box"> <div class="bg bg-center"> <?php $conn = mysqli_connect("localhost", "quiz", "quiz", "quiz"); // Check connection if($conn === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } $token = $_REQUEST['token']; $sql = "SELECT * FROM zgloszenia WHERE token='$token' AND potwierdzenie_email=0"; $result = mysqli_query($conn, $sql); $notverified = mysqli_num_rows($result); if ($notverified){ $sql = "update zgloszenia set potwierdzenie_email=1 WHERE token='$token'"; $result = mysqli_query($conn, $sql); if ($result){ echo '<h2>Twoje zgłoszenie zostało zweryfikowane</h2>'; header( "refresh:5;url=http://localhost/quiz/" ); }else{ echo '<h2>Coś poszło nie tak z weryfikacją emaila</h2>'; } }else{ $sql = "SELECT * FROM zgloszenia WHERE token='$token' AND potwierdzenie_email=1"; $result = mysqli_query($conn, $sql); $verified = mysqli_num_rows($result); if ($verified){ echo '<h2>Twoje zgłoszenie zostało zweryfikowane już wczesniej</h2>'; header( "refresh:5;url=http://localhost/quiz/" ); }else{ echo '<h2>Brak takiego zgłoszenia</h2>'; header( "refresh:5;url=http://localhost/quiz/" ); } } // Close connection mysqli_close($conn); ?> </div> </div> </main> </body>
[-] form.js
[edit]
[+]
..
[-] COMMITMENT
[edit]
[+]
language
[+]
src
[-] form.php
[edit]
[+]
vendor
[-] show.php
[edit]
[-] verifyemail.php
[edit]
[-] composer
[edit]
[-] HackTimer.js
[edit]
[+]
css
[-] get_oauth_token.php
[edit]
[-] composer.bat
[edit]
[-] composer.json
[edit]
[-] composer.phar
[edit]
[-] index.php
[edit]
[+]
edit