Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2013
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <head>
  2. <link rel="stylesheet" type="text/css" href="ournewstyle.css" />
  3. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
  4. <script type="text/javascript" src="js/custom.js"></script>
  5. </head>
  6.  
  7. <?php
  8.  
  9. session_start();
  10.  
  11. if ($_GET['login']) {
  12. // Only load the code below if the GET
  13. // variable 'login' is set. You will
  14. // set this when you submit the form
  15.  
  16. if (in_array($_POST['entryphrase'], array('enter', 'goin', 'entrezvous', 'opensesame'))) {
  17. // Load code below if both username
  18. // and password submitted are correct
  19.  
  20. $_SESSION['loggedin'] = 1;
  21. // Set session variable
  22.  
  23. header("Location: protected.php");
  24. exit;
  25. // Redirect to a protected page
  26.  
  27. } else echo " ";
  28. // Otherwise, echo the error message
  29.  
  30. }
  31.  
  32. ?>
  33.  
  34. <form action="?login=1" method="post" id="ournewform">
  35. <input type="text" id="ournewlogin" name="entryphrase" class="fontface" />
  36. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement