If I have the below code to allow users to enter a quantity of an item, how would I go about setting what the user enters into a cookie, with a value of id, name, description, quantity per item the enter a quantity for and press the submit button? Also, can I use the onclick=”return false;” to the page does not reload every time a users presses the submit button for each item they want? And, once the cookie has the values for each item, how would I go about reading those values from the cookie to display on a separate page?
[code]
<form name=”orderList” class=”products” action=”<?=$_SERVER[‘PHP_SELF’];?>”>
<p>
<strong>Price: $<?=$price;?> ea.</strong>
</p>
<p>
<strong>Min. Qty: </strong><?=$min_qty;?>
</p>
<p>
<span style=”float:left; width:25px;”>Qty:</span> <span style=”float:right;width:135px;”><input type=”text” name=”item_qty_ordered” id=”item_qty_ordered” class=”qtyOrdered” value=”<?=$item_qty_ordered;?>” /></span>
</p>
<p style=”display:none;”>
<input type=”hidden” name=”item_id” id=”item_id” value=”<?=$id;?>” />
<input type=”hidden” name=”item_name” id=”item_name” value=”<?=$name;?>” />
<input type=”hidden” name=”item_price” id=”item_price” value=”<?=$price;?>” />
</p>
<p>
<input type=”submit” name=”submit” value=”Add to Order” onclick=”return false;” class=”button” />
</p>
</form>
Thanks!!