MySQL Forums
Forum List  »  PHP

errror showing ...check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Posted by: sahil gulati
Date: July 12, 2015 01:10PM

php code of "deleterow.php"......

<?php
$id=$_GET['sid'];
$conn=mysqli_connect("localhost","root","","upl") or die("unable to conect");
$sql="DELETE FROM upl WHERE id=$id";

$correcty=mysqli_query($conn,$sql);

if($correcty)
{

header('location:db2table+delete-update.php');


}
else
{
echo "unable to delete";
echo mysqli_error($conn);
}
?>





ERROR IS : -

Notice: Undefined index: sid in C:\xampp\htdocs\from\zipp\upload\deleterow.php on line 2
unable to delete
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.