Advertisement
Guest User

Untitled

a guest
Sep 17th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function database_write ($order_id, $status)
  2. {
  3. $servername = "localhost:8889";
  4. $username = "root";
  5. $password = "root";
  6. $dbname = "europroject";
  7. // Create connection
  8. $conn = mysqli_connect($servername, 'root', 'root', $dbname);
  9. // Check connection
  10. if ($conn->connect_error) {
  11. //TODO errormmessage aanpassen
  12. die("Connection failed: " . $conn->connect_error);
  13. }
  14.  
  15.  
  16.  
  17. $order_id = intval($order_id);
  18.  
  19.  
  20.  
  21.  
  22.  
  23. mysqli_query($con,"INSERT INTO payments (ID,status) VALUES (44, 'testing')");
  24.  
  25.  
  26. mysqli_close($con);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement