Im having trouble trying to find out why my script wont delete a row in my table.
Each user has a randomkey assigned to them. I need to say delete row in table where random key equals that to the user...
<?php
$userRand = $_GET['Rand'];
$delUser = mysql_query("DELETE from users WHERE randomkey = '" . mysql_real_escape_string($userRand));
if(! $qResult )
{
die('Could not delete data: ' . mysql_error());
}
elseif($qResult )
{
echo "deleted";
}
?>
the following outputs...
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 ''111111111' at line 1