$term = $_POST['term'];
$sql = mysql_query("SELECT * FROM tblCocktail WHERE Ingredients LIKE '%$term%'");
This is part of the code I am using to take the value from a text entry box and search my database. However I want to change it so that instead of %$term% It loops through an array, for the ability to search for multiple selected terms.
Any help is appreciated
-Matt
You can construct the search expression by looping through the array.
But beware you should be using prepared statements rather than having expressions like these to avoid SQL injection.
Hope that helps.