Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once 'dbconnect.php';
- $connection = mysqli_connect("localhost", $DBuser, $DBpass, $DBname);
- if(mysqli_connect_errno()){
- echo "failed to connect " . mysqli_connect_error();
- }
- $ownerid = $_POST['ownerid'];
- $top= $_POST['top'];
- $left = $_POST['left'];
- $draggableid = $_POST['draggableid'];
- $query = "INSERT INTO drag (ownerid, top, left, draggableid)
- VALUES ('$ownerid', '$top','$left', '$draggableid')";
- $result = mysqli_query($connection,$query);
- if (!$result) {
- die('Error' . mysqli_error($connection));
- }else{
- echo '<script type="text/javascript">history.go(-1);</script>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement