Advertisement
Guest User

Untitled

a guest
Nov 14th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <?php
  4. require_once("index.php");
  5. ?>
  6. <head>
  7. <title> Login to UberU </title>
  8. </head>
  9.  
  10. <body>
  11. <div name = "main" align = "center">
  12. <h1><u><font face = "arial" style = "color:black"> UberU LOGIN </font></u></h1>
  13. <form method = "post">
  14. Username:<input type = "text" name = "username" size = "width:300px"> <br> <br>
  15. Password:<input type = "password" name = "password" size = "width:300px" style = "margin-left:4px"> <br> <br>
  16. <input type = "submit" name = "loginButton" value = "Login" style = "margin-left:10px">
  17. </form>
  18. <?php
  19. $username = "null";
  20. $password = "null";
  21. if(isset($_POST["username"])) {
  22. $username = $_POST["username"];
  23. }
  24. if(isset($_POST["password"])) {
  25. $password = $_POST["password"];
  26. }
  27. if($username&&$password) {
  28. $connect = mysqli_connect("localhost:8080","root", "") or die ("ERROR: Connection failed...");
  29. mysqli_select_db("users") or die("ERROR: Couldn't find database...");
  30.  
  31. }
  32. else {
  33. die("Please enter a username and a password...");
  34. }
  35. ?>
  36. <form action = "createAccount.php" method = "post">
  37. <br> <br> <br> Don't have an account yet? Click <input type = "submit" value = "here!">
  38. </form>
  39. </div>
  40. </body>
  41. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement