I posted this in the MySQL forum and after 3 days without any help I thought I might have it posted in the wrong forum so I am posting it here.

I am trying to query a terms database with multiple text boxes. The user has a choice of how many text boxes they want (i have this part done), they would put one term into each text box. The would have the option of checking a check box for pronunciation, date of origin, etc. These check boxes when checked would search all terms in the text boxes and return the data if available along with the definitions of each term. The definitions for each term will be listed as 1, 2, 3, etc. the output should look like this:

House (term)
1. A building for human habitation.
2. A shelter for an animal
3. A building where something is stored.

However, each of the numbered definitions should have a check box to the left and when checked and submitted will show another page with the results of the checked boxes as well as the term.

I am having difficulty getting past the select the number of word boxes. I don't seem to be able to get the query to work for the search.

Can anyone help with the type of query or script help that I would need to make.


Although I don't 100% understand what you are requesting, I shall give you a script which shows how displaying the results. This however takes the knowledge of mysql querys, php and html lists.

//$_POST['term1'] is first posted search variable
//$_POST['term2'] is second posted search variable
//$_POST['term3'] is third posted search variable
$resulta=mysql_query("SELECT * FROM `tablename` WHERE `term`='".$_POST['term1']."'");
echo "<ol>The term is: ".$_POST['term1']."<br>";
while ($rowa=mysql_fetch_array($resulta))
    echo "<li type='1'>".$rowa['definition_column_name']; //html li might be different
echo "</ol>";

$resultb=mysql_query("SELECT * FROM `tablename` WHERE `term`='".$_POST['term2']."'");
echo "<ol>The term is: ".$_POST['term2']."<br>";
while ($rowb=mysql_fetch_array($resultb))
    echo "<li type='1'>".$rowb['definition_column_name']; //html li might be different
echo "</ol>";

$resultc=mysql_query("SELECT * FROM `tablename` WHERE `term`='".$_POST['term2']."'");
echo "<ol>The term is: ".$_POST['term2']."<br>";
while ($rowc=mysql_fetch_array($resultc))
    echo "<li type='1'>".$rowc['definition_column_name']; //html li might be different
echo "</ol>";

So the above will show you the basics of displaying the result and hopefully give you enough to help answer some of the questions. Also note that the html side of the lists in the script may not be accurate and the variables will need adjusting to what they are set in your current page/mysql database.