javascript - PHP Shopping Cart Problem -
okay, have shopping cart problem.
i've decided roll out own cart, alot easier had expected. but, i've run problem , cannot life of me figure out next.
the problem:
after adding products cart, user taken "checkout" page, edit quantities of items want.
these items displayed in table.
how can these items edited/new values php variable, , update corresponding entries in database?
the page in question is:
but see stuff in "checkout" page, you'll need visit:
http://www.com.au/.php , click on few prices, , click "place order" link above table.
any help/advice @ appreciated.
if understand correctly, need add input variable.
<tr> <td>cool item</td> <td><input type='text' name='items[<?=$product_id;?>]' value='1' /></td> </tr>
then check $_post['items'] array.
foreach($_post['items'] $product_id=>$quanity) { proccessitem($product_id, $quanity); }
Comments
Post a Comment