Hi, I have a list of products which varies depending on search and or categories the user has choosen.
I'm generating them dynamically so each has a form named for the product id.
Each has a quantity field and a subtotal button.
All this works except for one thing.
The quantity and total are configured for all products at the same time with the same quantity.
How can I set it to return only the requested products total and retain the same look?
Below is code for the product
and here is link to test page choose Express Categories drop menu at bottom left.
Thanks
test link
http://www.globalhardwareinc.com/catalogzz.php
Products list code:
<?php
echo '<tr><td>';
$link = mysql_connect("**", "", "");
mysql_select_db("**");
$query = "SELECT FROM aai_cat WHERE (Categories = '$aai_cat_xpress')";
$results = mysql_query($query) or die (mysql_query());
while ($row = mysql_fetch_array ($results)) {
extract($row);
$prodqtysubtotal = $AAIqty $AAI_Contractor;
$prodwtsubtotal = $AAIqty * $Weight;
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
echo '<form action="catalogzz.php" method="post" name="prod';
echo $AAI_Model;
echo '">';
echo '<tr>
<td width="143" align="right" style="padding: 5 0 5 0" bgcolor="#FFFFFF"><img src="images/';
echo $thumbnail;
echo '" border="0" width="133" height="88"></td>
<td width="180" align="left" valign="top" class="text12" style="padding:10 0 0 10;" bgcolor="#FFFFFF"><b>Model No.: ';
echo $AAI_Model;
echo ':<input name="AAI_Model" type="hidden" value="';
echo $AAI_Model;
echo '"><input name="aai_cat_xpress" type="hidden" value="';
echo $Categories;
echo '"><br>';
echo $Categories;
echo '</b><br>';
echo $Descriptions;
echo '<br>Weight: ';
echo $Weight;
echo ' lbs<br>';
echo 'Price: $';
echo sprintf("%01.2f", $AAI_Contractor);
echo '</td>
<td width="257" align="left" valign="top" bgcolor="#FFFFFF" class="text12" style="padding:10 0 0 10;">
<b>Quantity:</b> <input name="AAIqty" type="text" class="catlist" id="quantity" style="width:70px; margin:3 0 3 0;" value="';
echo $AAIqty;
echo '"> <input name="Submit" type="submit" class="catlist" style="background-color:#725050; color:#FFFFFF; font-weight:bold; width:80px; margin:3 0 3 0; cursor:hand;" value="Subtotal"><br>';
echo '<b>Weight subtotal:</b> ';
echo $prodwtsubtotal;
echo ' lbs<br>';
echo '<b>Price subtotal:</b> $';
echo sprintf("%01.2f", $prodqtysubtotal);
echo '<br>
<input name="POSubmit" type="submit" class="catlist" style="background-color:#725050; color:#FFFFFF; font-weight:bold; width:175px; margin-top:5px; margin-bottom:6px; cursor:hand;" value="Add To Purchase Order"></td>';
echo ' </tr>
<tr>
<td height="1" colspan="6" align="right" bgcolor="#725050"><img src="images/spacer.gif" width="1" height="1"></td>
</tr></form></table>';
}
echo '</td></tr>';
?>