<td><form name="form1" method="post" action="View_Item.php?ref=<? echo $ref ?>&action=getitem">
<table width="70%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="82%"><div align="center">
<p> <? $item_code = isset($GET['item_code'])?$GET['item_code']:"";
$quantity = isset($GET['quantity])?$GET['quantity']:"";
$result = mysql_query("SELECT * FROM stationary
WHERE item_code='$item_code'") or die(mysql_error());
$row = mysql_fetch_array( $result );
$quantity = 'count';
$count = $row['count'] - 1;
$result = mysql_query("UPDATE stationary SET count='$count' WHERE item_code='$item_code'")
or die(mysql_error());
<input name="Search" type="submit" id="Search" value="Submit">
</p>
cant work..anyone hv any greater idea to modify the code?
i just want the user to be able to get the item, then display it in their cart in case they want to add other item or cancel it and then submit it to be taken. quantity in the stock then will automatically reduce itself.
anyone...pls help...