I have a drop down that has product categories. I want to add an ALL to the dropdown but I cannot make that work
Here is my processing code
And here is my search page code
So pretty much I can search each category within the price specified but I cannot for the life of me figure out how to get ALL to work.
[Hammer]
Nike Failed Slogans -- "Just Don't Do It!"
Here is my processing code
Code:
<?php require_once('Connections/connCorp.php'); ?>
<?php
$prod_products = "0";
if (isset($HTTP_POST_VARS['ProductType'])) {
$prod_products = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS['ProductType'] : addslashes($HTTP_POST_VARS['ProductType']);
}
$lowprice_products = "1";
if (isset($HTTP_POST_VARS['LowPrice'])) {
$lowprice_products = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS['LowPrice'] : addslashes($HTTP_POST_VARS['LowPrice']);
}
$highprice_products = "1600";
if (isset($HTTP_POST_VARS['HighPrice'])) {
$highprice_products = (get_magic_quotes_gpc()) ? $HTTP_POST_VARS['HighPrice'] : addslashes($HTTP_POST_VARS['HighPrice']);
}
mysql_select_db($database_connCorp, $connCorp);
$query_products = sprintf("SELECT * FROM products WHERE (msrp BETWEEN '%s' AND '%s') AND (product = '%s')", $lowprice_products,$highprice_products,$prod_products);
$products = mysql_query($query_products, $connCorp) or die(mysql_error());
$row_products = mysql_fetch_assoc($products);
$totalRows_products = mysql_num_rows($products);
?>
And here is my search page code
Code:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
td.font {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #0099FF;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="640" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/index_r1_c1.gif" width="521" height="43"><a href="product.php"><img src="images/index_r1_c12.gif" width="119" height="43" border="0"></a></td>
</tr>
<tr>
<td height="26" align="center" bgcolor="#003366"><?php include("menu.php"); ?>
</td>
</tr>
<tr>
<td><img src="images/producthd.gif" width="640" height="130"></td>
</tr>
<tr>
<td><table width="640" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20" rowspan="2"> </td>
<td><p align="left"><font size="+2" face="Arial, Helvetica, sans-serif" color="#006699"><a href="[URL unfurl="true"]http://www.companycasuals.com/catalog-servlets/CustomBrowser?customer=cascade"><img[/URL] src="images/apparel.gif" width="90" height="56" align="right" border="0"></a>Providing
products that meet your needs.</font></p>
<p align="left"><font face="Arial, Helvetica, sans-serif"> Tap the
full power of brand named merchandise incentives. Cascade Promotion
Corporation utilizes highly desirable merchandise you can for your
program and budget. To get started, you can use our product finder
to locate items suited to your needs.</font></p>
<p align="left"><font face="Arial, Helvetica, sans-serif"><b> Enter
any combination pricing and Product Types to get a catalog of
products meeting your specifications:<br>
<br>
</b></font></p></td>
</tr>
<tr>
<td><form action="productsearch.php" method="post" name="productSearch" id="productSearch">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30"><div align="right" style="font: verdana; font-size: 10px; color: #0099ff;"><strong>LOW PRICE </strong></div></td>
<td height="30"> |
<input name="LowPrice" type="text" id="LowPrice" value="1"></td>
</tr>
<tr>
<td height="30"><div align="right" style="font: verdana; font-size: 10px; color: #0099ff;"><strong>HIGH PRICE </strong></div></td>
<td height="30"> |
<input name="HighPrice" type="text" id="HighPrice" value="1600"></td>
</tr>
<tr>
<td height="30"><div align="right" style="font: verdana; font-size: 10px; color: #0099ff;"><strong>TYPE
OF PRODUCT</strong></div></td>
<td height="30">|
<select name="ProductType" size="1" id="ProductType">
<option value="0" selected>ALL
<option value="1">CAMERAS
<option value="2">CRYSTAL
<option value="3">ELECTRONICS
<option value="4">HOME OFFICE
<option value="5">HOUSEWARES
<option value="6">OPTICS
<option value="7">OUTDOOR SPORTS
<option value="8">WATCHES
</select></td>
</tr>
<tr>
<td height="40" colspan="2" align="center" valign="middle"><input type="submit" name="Submit" value="SUBMIT">
<input type="reset" name="Submit2" value="RESET"></td>
</tr>
</table>
<br><?php include("bottom.php"); ?>
</form></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
So pretty much I can search each category within the price specified but I cannot for the life of me figure out how to get ALL to work.
[Hammer]
Nike Failed Slogans -- "Just Don't Do It!"