I have on one page a form with a textbox named "searchterms". On the search.php page (which you upload to) I have:
Code: Select all
<?php
$searchterms = $_POST['searchterms'];
$chunkTerms = explode(" ", $searchterms);
?>I need to be able to get the exploded terms into an array or something, so that I can search for them in the DB. For example, the user enters "Joe Smith car". I need PHP to pick out "Joe", "Smith", and "car". I just don't know how to pick them out and put them into an array.
If you have a better method, please share.