Hi everyone,
I am sort of new to PHP and i have a few questions...![]()
1. $_SESSION["cart"] is supposed to be an array which holds an array variable which in the code its supposed to be $arow...
is there anything wrong with this code?
Code:$arow = array($id, $qty, $prc); if(isset($_SESSION["cart"])) { $found = 0; foreach($_SESSION["cart"] as $value) { if($id == $value[0]) { $found = 1; } } if($found == 0) { count++; $_SESSION["cart"][] = $arow; } } else { $count = 1; $_SESSION["cart"][] = $arow; }
2. When having a link, or a button, how does one go about so that a php function is called when that button is pressed or link is clicked ?
Thanks in advanced![]()




Reply With Quote