Skip to content Skip to sidebar Skip to footer

I Cannot Figure Out Why This Is Not Returning A Result From A Php Script Where Did I Go Wrong?

I have been trying to build a database for my father who owns a model circus store and I have run into a few issues this particular issue I cannot identify. When I run the search i

Solution 1:

Is $search_id actually an integer? Besides the injection attack risk (you're not doing any checking/escaping of the submitted value) and the fact that you shouldn't be using the mysql_* functions, it looks like it's a string, which means it needs to be quoted in your query:

$query = "SELECT * FROM $usertable WHERE Customer_Name = '$search_id'";

Post a Comment for "I Cannot Figure Out Why This Is Not Returning A Result From A Php Script Where Did I Go Wrong?"