Home  • Programming • PHP
explain the function if any one can function addtocart($pid,$q){ if(is_array($_SESSION['cart'])){ if(product_exists($pid)) return; $max=count($_SESSION['cart']); $_SESSION['cart'][$max]['productid']=$pid; $_SESSION['cart'][$max]['qty']=$q; } else{ $_SESSION['cart']=array(); $_SESSION['cart'][0]['productid']=$pid; $_SESSION['cart'][0]['qty']=$q; } }

Comments 26


About Author
Most Monira Begum
Copyright © 2026. Powered by Intellect Software Ltd