Possible Duplicate:
How to get useful error messages in PHP?
I'm trying to stop users cheating by when a user buys a item it removes it from the database and each time has an id.
So I have made a script so when a user buys an item it removes it from the db. So now I'm trying to select to see if the id is still in the db if not die the page to stop the user cheating and getting the item again.
But I'm getting a white page I think I might be missing a [ or a ] some where.
$sql11 = "SELECT id FROM sell WHERE id ='"$idofpokemonsell"' ";
$result11 = mysql_query($sql11);
if (mysql_num_rows($result11)==0) {
echo "Cheater Reported";
die
}
I have the connect and session start on top of this. And the rest of the scripts works on this page just not this.
I fixed it here is working code
$sql11 = "SELECT id FROM sell WHERE id ='$idofpokemonsell' ";
$result11 = mysql_query($sql11);
if (mysql_num_rows($result11)==0) {
echo "Cheater Reported";
die;
}
Just in case anyone need it . I missed a ; after the die also i put $idofpokemonsell in side "" but should of just been in side ''