Guest User

Untitled

a guest
Apr 21st, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. if($_POST['pwd']){
  2.         if ($_POST['pwd'] == $password){
  3.         session_start();
  4.         $_SESSION['active'] = TRUE;
  5.         echo 'logged in';
  6.         }
  7.         else{
  8.         if ($_GET['pwd'] != $password){
  9.         echo 'DENIED';
  10.         }
  11.     exit;
  12.     }
  13.     }
  14. if(!$_SESSION['active']){
  15.     echo' You will need to login to view info on this page!';
  16.     echo '<form action="index.php?action=index" action="post">
  17.             <input type = "name" name="username"/>
  18.             <input type="password" name="pwd" />
  19.             <input type = "submit" value ="submit" />
  20.           </form>';
  21. }
Add Comment
Please, Sign In to add comment