Guest User

Untitled

a guest
Jul 3rd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4.  
  5. if (isset($_POST['Submit'])){
  6. if (isset($_POST['username'],$_POST['password'])) {
  7. $user = $_POST['username'];
  8. $pass = $_POST['password'];
  9.  
  10. if (($user == 'Giggs') && ($pass == 'password')) {
  11. $_SESSION['login'] = 'true';
  12. echo 'Logged in successfully.';
  13. }
  14. else { echo 'Fuck off.'; }
  15. }
  16. }
  17.  
  18. ?>
  19.  
  20. <form action="#" method="post">
  21. Username: <input type="text" name="username"><br /><br />
  22. Password: <input type="password" name="password"><br /><br />
  23. <input type="submit" name="Submit" value="Submit">
  24. </form>
  25.  
  26.  
  27.  
  28.  
  29.  
  30. --------------------------
  31.  
  32.  
  33. <?php
  34.  
  35. session_start();
  36.  
  37. if ($_SESSION['login'] == 'true') {
  38. echo 'blahhhhh';
  39. }
Add Comment
Please, Sign In to add comment