diff --git a/index.php b/index.php new file mode 100644 index 0000000..964bed1 --- /dev/null +++ b/index.php @@ -0,0 +1,35 @@ +bootstrap(); +$arraybackground = array('win7.png', 'win8.png', 'epic.png', 'yosemite.png', 'aurora.png', 'tiger.png', 'fish.png'); +$countofarray = rand(0, count($arraybackground)-1); +$background = "$arraybackground[$countofarray]"; +$youtubefunnies = array('bitqf13QU7Q', 'Z_V6yKKIk5U', '2tHl6O5Sp8w', '-5WcDfKndxU', 'cwyTleTL06Y'); +$getthecount = rand(0, count($youtubefunnies)-1); +$youtubevideo = "$youtubefunnies[$getthecount]"; +?> + + +undefined +

undefined

+

the funny website with

+Register +Login
+
\ No newline at end of file diff --git a/login.php b/login.php new file mode 100644 index 0000000..e69de29 diff --git a/register.php b/register.php new file mode 100644 index 0000000..fdb370e --- /dev/null +++ b/register.php @@ -0,0 +1,84 @@ +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.
'; + } ?> + + + +
+ +
+
+
Random useless fact generator
+
+

{"data"}; ?>

+
+
\ No newline at end of file