Guest User

Untitled

a guest
Jul 11th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. <?php
  2. include_once 'dbh.inc.php';
  3.  
  4. $first = $_POST['first'];
  5. $last = $_POST['last'];
  6. $email = $_POST['email'];
  7. $uid = $_POST['uid'];
  8. $pwd = $_POST['pwd'];
  9.  
  10.  
  11. $sql = "INSERT INTO users (user_first, user_last, user_email, user_uid, user_pwd)
  12. VALUES ('$first', '$last', '$email', '$uid', '$pwd');";
  13. mysqli_query($conn, $sql);
  14.  
  15. header("Location: ../index.php?signup=success");
  16.  
  17. <?php
  18. $dbServername = "localhost";
  19. $dbUsername = "root";
  20. $dbPassword = "";
  21. $dbName = "loginsystem";
  22.  
  23. $conn = mysqli_connect ($dbServername, $dbUsername, $dbPassword, $dbName);
  24.  
  25. <form action "db/signup.inc.php" method="POST">
  26. <input type="text" name="first" placeholder="Firstname">
  27. <br>
  28. <input type="text" name="last" placeholder="Lastname">
  29. <br>
  30. <input type="text" name="email" placeholder="E-mail">
  31. <br>
  32. <input type="text" name="uid" placeholder="Username">
  33. <br>
  34. <input type="password" name="pwd" placeholder="Password">
  35. <br>
  36. <button type="submit" name="submit" > Registar</button>
  37.  
  38.  
  39. </form>
Add Comment
Please, Sign In to add comment