Advertisement
Guest User

Untitled

a guest
Mar 12th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <form id="form" action="index.php" method="POST" name="lab14">
  2.  
  3. Username:
  4. <input type="text" name="username"><br/>
  5.  
  6. Password:
  7. <input type="password" name="password"><br/>
  8.  
  9. <input type="submit" name="submit" value="Submit">
  10. </form>
  11.  
  12. <?php
  13.  
  14. session_start();
  15.  
  16. // first part
  17. if (isset($_SESSION['name']))
  18. {
  19. echo '<a href="logout.php">Logout</a>';
  20. }
  21.  
  22. // second part
  23. if(isset($_POST['name']))
  24. {
  25. $username = $_POST['username'];
  26. $password = $_POST['password'];
  27. if($username=='comp' && $password == 'php123')
  28. {
  29.  
  30.  
  31.  
  32.  
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement