Hello everyone...im sorta a newb still in PHP but here it goes...
This is basically what id like to do...
Is there a way to create drop down menus with options that a user can select which would then change the value in the MySQL query?
....basically i have a database with 6 tables (parts lists) and would like to create a search page where the user can select which table he would like to search in and then also have another drop down menu where the user would define what he is searching for: Item# or a Description....then this would dynamically change the values for the table and filed in the query?
ex.
Search our Catalog!
<FORM ACTION="parts2.php" METHOD=POST>
<P>Select Manufacturer:
<P>
<select name="select">
<option>AB_DICK</option>
<option>ITEK</option>
<option>MULTIGRAPHICS_1</option>
<option>MULTIGRAPHICS_2</option>
<option>RYOBI</option>
<option>TOWNSEND</option>
</select>
<P>Select: Item # or Description
<P>
<select name="select2">
<option>ITEM</option>
<option>DESCRIPTION</option>
</select>
<P>
<P>Keywords:<br>
<input type=text name="search" size=30>
<p><input type=submit name="submit" value="Search"></p>
</FORM>
<?
$conn = mysql_connect("host", "user", "pass") or die("Could not connect");
mysql_select_db("T51partsDB",$conn);
$sql = "select ITEM, DESCRIPTION, UOM, QTY_PER_PCKG, LIST_PRICE, NOTES from (option here) where (option here) like '%$search%'";
any help appreciated....