post option, foreach, session arrays problem
Posted: Mon May 24, 2010 10:56 am
My problem is:
1.The value from drop down list did not post, should I post it on 1.php using if(isset..., & redirect,
or
using "$size_id = $_SESSION['size_id'] = htmlentities($_POST['size_id'], ENT_QUOTES);" on 2.php
2.How to deal with this "foreach($_SESSION['cart'] as $id => $q){" on 3.php, since it carry 2 value(id & size)?
Thank you, any advice will be appreciate.
1.The value from drop down list did not post, should I post it on 1.php using if(isset..., & redirect,
or
using "$size_id = $_SESSION['size_id'] = htmlentities($_POST['size_id'], ENT_QUOTES);" on 2.php
2.How to deal with this "foreach($_SESSION['cart'] as $id => $q){" on 3.php, since it carry 2 value(id & size)?
Thank you, any advice will be appreciate.