Guest User

Untitled

a guest
May 2nd, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>sign up processing</title>
  4. </head>
  5. <body>
  6. <a href="register.php">Sign Up</a>
  7. <a href="index.php">Home</a>
  8. <br>
  9. <?php
  10. $user = $_POST["name"];
  11. $pass = $_POST["pass"];
  12. $passCheck = $_POST["passCheck"];
  13. $email = $_POST["email"];
  14. $emailCheck = $_POST["emailCheck"];
  15. $link = mysql_connect("localhost", "root", "leroy");
  16. if (!$link)
  17. {
  18. die('Could not connect. ' . mysql_error());
  19. }
  20. else
  21. {
  22. if ($email == $emailCheck)
  23. {
  24. if ($pass == $passCheck)
  25. {
  26. mysql_select_db("userList", $link);
  27. mysql_query("INSERT INTO userInfo (userName, password, email) VALUES ($user, $pass, $email)");
  28. echo "Your username has been created with the following information:";
  29. <br>echo "Username: $user";
  30. <br>echo "Password: $pass";
  31. <br>echo "Email Address: $email";
  32. }
  33. else
  34. {
  35. <br>echo 'The data you entered was not correct. Please re-enter data';
  36. }
  37. }
  38. else
  39. {
  40. <br>echo 'The data you entered was not correct. Please re-enter data';
  41. }
  42. }
  43. ?>
  44. </body>
  45. </html>
Add Comment
Please, Sign In to add comment