Advertisement
Guest User

Untitled

a guest
Apr 4th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. require_once ‘users/init.php’;
  2. $conn = DB::getInstance();
  3.  
  4. $user_id = 2;
  5. $aaa = Input::get("aaa");
  6. $bbb = $_POST["bbb"];
  7. $ccc = $_POST["ccc"];
  8. $ddd = $_POST["ddd"];
  9. $eee = $_POST["eee"];
  10. $fff = 1;
  11.  
  12. $query = $conn->prepare("INSERT INTO foo (user_id,aaa,bbb,ccc,ddd,eee,fff) VALUES (:user_id, :aaa, :bbb, :ccc, :ddd, :eee, :fff)");
  13.  
  14. $query->bindParam(':user_id', $user_id);
  15. $query->bindParam(':aaa', $aaa);
  16. $query->bindParam(':bbb', $bbb);
  17. $query->bindParam(':ccc', $ccc);
  18. $query->bindParam(':ddd', $ddd);
  19. $query->bindParam(':eee', $eee);
  20. $query->bindParam(':fff', $fff);
  21.  
  22. $query->execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement