Pass multiple ids from product page to cart page
hi all
at present i am adding single product to cart via href
PHP Code:
<?
<a href="cart.php?product_id=1"><img src="addtocart.gif"></a>
?>
now i want to add "product 1" + "related_products with checkboxes" if their checkboxes are checked.
PHP Code:
<input type="checkbox" value="2" name="related[]" />
<input type="checkbox" value="3" name="related[]" />
<input type="submit" value="addtocart">
i can get checkboxes values in array()
PHP Code:
<?
$related_all = array();
$related_all = $_REQUEST['related'];
?>
how will i pass all these 3 values to cart.php and what will my below insert code be changed to
PHP Code:
<?
if(isset($_REQUEST['product_id']))
{
$qry = "Insert into cart_table"
}
?>
vineet