I\'m new to PHP and MySQL. I am trying to make a simple search form using which I would want to show the results from the database based on the input text entered in the form. M
This should work:
$query = "SELECT * FROM cats WHERE name = '$name'";
cats
Also, when you call "exit;" in the following block it will cancel the execution of the rest of your script:
if (!empty($results)){ echo "query successful" ; exit; }