Guest User

Untitled

a guest
Jun 11th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. $stat1 = $db->prepare("insert into about values(?,?,?,?,?)");
  2.  
  3. <?php
  4. $host = 'localhost';
  5. $db = 'form';
  6. $user = 'root';
  7. $dbpass = '';
  8.  
  9.  
  10. if(isset($_POST['save'])){
  11. $id = uniqid();
  12. $name = $_POST['name'];
  13. $email = $_POST['email'];
  14. $phone = $_POST['phone'];
  15. $address = $_POST['address'];
  16. $username = $_POST['username'];
  17. $password = md5($_POST['password']);
  18. $title = $_POST['title'];
  19. $description = $_POST['description'];
  20. $sites = $_POST['sites'];
  21. $category = $_POST['category'];
  22. $stat1 = $db->prepare("insert into about values(?,?,?,?,?)");
  23. $stat1->bindParam(1, $id);
  24. $stat1->bindParam(2, $name);
  25. $stat1->bindParam(3, $email);
  26. $stat1->bindParam(4, $phone);
  27. $stat1->bindParam(5, $address);
  28. $stat1->execute();
  29. $stat2 = $db->prepare("insert into account values(?,?,?)");
  30. $stat2->bindParam(1, $id);
  31. $stat2->bindParam(2, $username);
  32. $stat2->bindParam(3, $password);
  33. $stat2->execute();
  34. $stat3 = $db->prepare("insert into website values(?,?,?,?,?)");
  35. $stat3->bindParam(1, $id);
  36. $stat3->bindParam(2, $title);
  37. $stat3->bindParam(3, $description);
  38. $stat3->bindParam(4, $sites);
  39. $stat3->bindParam(5, $category);
  40. $stat3->execute();
  41. header('Location: save.php');
  42. }
  43. ?>
Add Comment
Please, Sign In to add comment