Advertisement
Guest User

Untitled

a guest
May 11th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <title>Login Page</title>
  4.     </head>
  5. <body>
  6. <?php
  7.  
  8. if ( isset( $_POST['login_submit'] )
  9. {
  10.     // if ( $Username == janedoe && $Password == gud_neighb0r )
  11.    
  12.     $username = $_POST['username'];
  13.     $password = $_POST['password'];
  14.    
  15.     if ( $username == 'janedoe' && $password == 'gud_neighb0r' )
  16.     {
  17.         echo 'Login was successful! Welcome, ' . $username . '!';
  18.     }
  19.     else
  20.     {
  21.         echo 'Login unsuccessful. Please retry.<br />';
  22.         echo "<meta http-equiv='refresh' content='5; login.php' />";
  23.     }
  24. }
  25.  
  26. ?>
  27. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
  28.     <span style="color:#FF0099;">Username: <input type="text" name="username" size="20" /></span>
  29.     <span style="color:#FF0099;">Password: <input type="password" name="password" size="20" /></span>
  30.     <span style="color:#FF0099; text-align:center;"><input type="submit" name="login_submit" value="Login" size="20" /></span>
  31. </form>
  32.  
  33. </body>
  34. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement