You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#selects rows which has columns containing strings LIKE the inputted text
$result = $myPDO->query("SELECT Name FROM animals_db WHERE Category LIKE '%$input%' OR Diet LIKE '%$input%' OR Tags LIKE '%$input%' OR ScientificName LIKE '%$input%' OR Name LIKE '%$input%' ");
#declares a php array called "names"
$names = array();
#loops through the result from the query and append the Name of each row into the "names" array