I'm using PHP/MySQL to verify that one value exists in the column "tokencol". "$token" is the value that I want to verify and I'm sure that it has been entered properly.
Below is my code:
$verifytoken = mysql_query("SELECT * from tokens where tokenrow = '$token'");
if(mysql_num_rows($verifytoken) == TRUE) {
echo "hello";
} else {
die("Valid token not provided.");
}
I always get the "Valid token not provided." message instead of "hello".
What should I do to fix? Thanks
var_dumporprint_rresult of query$verifytokenand also check whatmysql_errorsays.