View Single Post
  #5 (permalink)  
Old 01-16-05, 09:33 AM
Klesti Klesti is offline
Newbie Coder
 
Join Date: May 2004
Location: Albania
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
You can do it using SESSIONS

So take a look at sessions.

PHP Code:



//Shoping cart example 

session_start();

//Lets supose $_SESSION['shop_cart'] is the array of shopping cart and $item is the item passed from another script

array_push($_SESSION['shop_cart'], $item); 

//To show the shoping cart just work with the array $_SESSION['shop_cart'];

while (list($key$val) = each($_SESSION['shop_cart'])) {
    echo 
"$key => $val\n";

Reply With Quote