Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <?php
  2. include_once 'dbconnect.php';
  3. $connection = mysqli_connect("localhost", $DBuser, $DBpass, $DBname);
  4. if(mysqli_connect_errno()){
  5. echo "failed to connect " . mysqli_connect_error();
  6. }
  7.  
  8.  
  9. $ownerid = $_POST['ownerid'];
  10. $top= $_POST['top'];
  11. $left = $_POST['left'];
  12. $draggableid = $_POST['draggableid'];
  13.  
  14.  
  15. $query = "INSERT INTO drag (ownerid, top, left, draggableid)
  16. VALUES ('$ownerid', '$top','$left', '$draggableid')";
  17. $result = mysqli_query($connection,$query);
  18. if (!$result) {
  19. die('Error' . mysqli_error($connection));
  20. }else{
  21. echo '<script type="text/javascript">history.go(-1);</script>';
  22. }
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement