SEARCHING FOR MULTIPLE WORDS IN MULTIPLE FIELDS - Mar 9th, 2012


In this example, a search would return all records where the field yourfield contains an exact mtch for a word or
phrase. If those words appeared in another order, or their was an extra space, or they were found in another field, they
would be ignored.

<form action="results.php" method="post">
<table>
<tr>
<td >enter search terms:</td>
<td ><input type="text" name="yourfield_keyword" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td ><input type="submit" value="Search" /></td>
</tr>
</table>
</form>


If you want to search for all the words in a phrase in any order, change your keyword search to a query search.

<input type="text" name="yourfield_query" />


And if you wanted to search in multiple fields, then you'd have to list all the fields you want it to search, separated
by commas, in the input field name.

<input type="text" name="yourfield,yourfield2,yourfield3_query" />



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service