I have a search page that queries mySQL and prints the results. Here's the form:
<form name="form1" method="post" action="">
<input name="search-terms" type="text" id="search-terms">
<input type="submit" name="Submit" value="Submit">
</form>
But what if the user puts more than one term into the input box (search_terms)? I want to be able to split the words up put them into an array and use each on a query:
$search_terms = $_POST['search_terms'];
select from myTable where myCol = '$search_terms'
Any help much appreciated!
<form name="form1" method="post" action="">
<input name="search-terms" type="text" id="search-terms">
<input type="submit" name="Submit" value="Submit">
</form>
But what if the user puts more than one term into the input box (search_terms)? I want to be able to split the words up put them into an array and use each on a query:
$search_terms = $_POST['search_terms'];
select from myTable where myCol = '$search_terms'
Any help much appreciated!