Advertisement
Guest User

Untitled

a guest
May 22nd, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. if (isset($_POST["submit"])) {
  2. $username = trim($_POST["username"]);
  3. $password = trim ($_POST["password"]);
  4.  
  5. if (has_presence($username)) {
  6. redirect_to("Homepage2.php");
  7. }
  8. }
  9.  
  10.  
  11. ?>
  12.  
  13.  
  14. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  15. "http://www.w3.org/TR/html4/loose.dtd">
  16.  
  17. <html lang="en">
  18. <head>
  19. <title>Start Collay Login(beginLogin)</title>
  20. </head>
  21. <body>
  22.  
  23. <?php echo "This is the first login page"; ?>
  24.  
  25.  
  26. <form action="beginLogin.php" method="post">
  27. Username: <input type="text" name="username" value=""><br>
  28. Password: <input type="text" name="password" value=""><br>
  29. <input type="submit" name="submit" value="submit">
  30. </form>
  31.  
  32. </body>
  33. </html>
  34.  
  35. <?php
  36. function redirect_to($new_location) {
  37. header("Location: " . $new_location);
  38. exit;
  39. }
  40.  
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement