Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?php
  2.  
  3. $username = 'michel';
  4. $password = '$2y$10$Da2gQ3ci2FsgfWXijqwwGuJYg1H.gHjkMrNjFIo0MPiN.xuIU3dWa';
  5.  
  6. if(isset($_POST['submit']))
  7. {
  8.     if(strlen($_POST['username']) < 1 || strlen($_POST['password']) < 1)
  9.     {
  10.         echo 'OHOI je hebt iets leeg gelaten';
  11.     }
  12.     else
  13.     {
  14.         if($_POST['username'] == $username && password_verify($_POST['password'], $password))
  15.         {
  16.             echo 'Login data was succesvol! Je bent ingelogd!';
  17.            
  18.         }
  19.         else {
  20.             echo 'OHOI we konden je niet inloggen!';
  21.         }
  22.     }
  23. }
  24.  
  25.  
  26.  
  27. ?>
  28.  
  29. <form method="post">
  30.     <input type="text" name="username" placeholder="Gerbuikersnaam">
  31.     <input type="password" name="password" placeholder="Wachtwoord">
  32.     <input type="submit" name="submit" value="Log in">
  33. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement