Guys,
Another question, hopefully someone can help me. I have to program a category search on the mysql database that the site is using. In the database, there are 2 tables, say for example cproduct and hproduct. Hproduct has alot of elements inside it and I want to perform a category search on them.
I have 2 pages. The first page is a drop down that lists the distinct product names of the elements in the table. The user selects one and then clicks on search and it should lead to the second page which lists all those products with that particular name.
My problem is that on the second page what do I say in the query??? How do I access that value of the option statement on page 1?...
One of the products in the table is MasterLine PAR-16 Halogen Lamps so I have that as my value in the option statement.
So when the user selects that and then clicks on search, the second page should list all the products with that name. Like I said I am having trouble calling that value in the query on the second page.
any suggestions???
i'm posting the code for page 1...
and my code for page 2 is...
if anyone can help, it'll be much appreciated
thanks
arif
X-) s-)
Another question, hopefully someone can help me. I have to program a category search on the mysql database that the site is using. In the database, there are 2 tables, say for example cproduct and hproduct. Hproduct has alot of elements inside it and I want to perform a category search on them.
I have 2 pages. The first page is a drop down that lists the distinct product names of the elements in the table. The user selects one and then clicks on search and it should lead to the second page which lists all those products with that particular name.
My problem is that on the second page what do I say in the query??? How do I access that value of the option statement on page 1?...
One of the products in the table is MasterLine PAR-16 Halogen Lamps so I have that as my value in the option statement.
So when the user selects that and then clicks on search, the second page should list all the products with that name. Like I said I am having trouble calling that value in the query on the second page.
any suggestions???
i'm posting the code for page 1...
Code:
<body text="#000000" leftmargin=0 marginwidth=0 marginheight=0 topmargin=0 bgcolor="#FFFFFF">
<table border=0 cellspacing=0 cellpadding=0 width=600>
<tr>
<td valign="top" height=219>
<table width=600 border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=119><!--#include virtual="includes/leftnav.html" --></td>
<td width=481 valign="top"><br>
<form action="halogensearch.php">
<table width=480 border=0 cellspacing=0 cellpadding=0>
<tr>
<td><font face="arial, helvetica, sans-serif" size=2>Halogen Categories:</font></td>
<td>
<select>
<option [b]value="MasterLine<sup>TM</sup> PAR-16 Halogen Lamps"[/b]>MasterLine<sup>TM</sup> PAR-16 Halogen Lamps</option>
<option [b]value="MasterLine<sup>TM</sup> PAR-20 Halogen Lamps"[/b]>MasterLine<sup>TM</sup> PAR-20 Halogen Lamps</option>
<option [b]value="MasterLine<sup>TM</sup> PAR-30S Short Neck Halogen Lamps"[/b]>MasterLine<sup>TM</sup> PAR-30S Short Neck Halogen Lamps</option>
//more option statements, just provided first three
</select>
</td>
</tr>
<tr>
<td colspan=2 align="center"><input type="submit" value="search"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
and my code for page 2 is...
Code:
<table width=740 border=0 cellspacing=0 cellpadding=0>
<tr>
<td colspan=2><font face=arial size=3><b>The Results: </b></font></td>
</tr>
<?
$sql = "select id, productname from halogenproduct [COLOR=red]where what?[/color]";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
extract($row);
?>
<tr>
<td><font face=arial size=2><? print $id; ?></font></td>
<td><font face=arial size=2><? print $productname; ?></font></td>
</tr>
<?
}
?>
</table>
if anyone can help, it'll be much appreciated
thanks
arif
X-) s-)