buildloggedoutheader(); $passwordconfirmiswrong = "false"; if(isset($_POST['submit'])) { $username = $_POST['username']; $password = $_POST['pass']; $passwordconfirm = $_POST['passconfirm']; echo "ur username: " . $username; echo "
"; echo "ur password: " . $password; echo "
"; echo "ur passwordconfirm: " . $passwordconfirm; if ($password == $passwordconfirm) { echo ''; echo "confirm pass is correct"; if (strlen($password) < 8) { $passwordistooshort = "true"; } if (strlen($password) > 8) { $passwordistooshort = "false"; } if ($passwordistooshort == "false") { $hashed = password_hash($password, PASSWORD_DEFAULT); echo $hashed; $getitstarted->db(); $checkusername = $db->prepare('SELECT * FROM users WHERE username=(username) VALUES (:username)'); $checkusername->execute([ 'username' => $username ]); if (mysqli_num_rows($checkusername) > 0) { echo "bruh momento"; }else if(mysqli_num_rows($checkusername) < 0){ echo "hello romania"; } } } else { $passwordconfirmiswrong = "true"; echo ''; } } $result = file_get_contents("https://useless-facts.sameerkumar.website/api"); $thefunfact = json_decode($result); ?>

Registration

" type="password" placeholder="Your password (Minmum 8 characters)" id="inputSmall" name="pass"> Password Confirmation field is invalid.
'; } else if ($passwordistooshort == "true") { echo '
Password is too short. (8 Characters minmum)
'; }?>
Random useless fact generator

{"data"}; ?>