Advertisement
Guest User

Untitled

a guest
Sep 1st, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <?php
  2.  
  3. $user = 'root';
  4. $password = 'root';
  5. $db = 'cdhouse';
  6. $host = 'localhost';
  7. $port = 3306;
  8.  
  9. $link = mysqli_init();
  10. $success = mysqli_real_connect(
  11. $link,
  12. $host,
  13. $user,
  14. $password,
  15. $db,
  16. $port
  17. );
  18.  
  19. $account = $_POST["account"];
  20. $password = $_POST["password"];
  21. $name = $_POST["name"];
  22. $phone = $_POST["phone"];
  23. $email = $_POST["email"];
  24. $current_area = $_POST["current_area"];
  25. $badge = $_POST["badge"];
  26. $wonder_area = $_POST["wonder_area"];
  27.  
  28. $sql = "INSERT INTO contacts(`account`,`password`,`name`, `phone`, `email`, `current_area`, `badge`, `wonder_area`) VALUES('$account','$password','$name', '$phone', '$email', '$current_area', '$badge', '$wonder_area')";
  29.  
  30. mysqli_query($link, $sql);
  31.  
  32. header("Location: /cdhouse");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement