Hi there
In my shop a had this code to add a product to the shoppingcart:
session_start();
session_register("cart");
if($action == "addtocart")
{
$cart[] = "$id,$amount";
}
To view the cart i had to explode the session_variable $cart and get
more data from the database.
session_start();
foreach($cart as $value)
{
$value = list($id, $amount) = explode(",", $value);
echo "$id : $amount\n";
}
This workt perfect bevor i hat to reinstall my Computer.
Now i have php 4.2.2 and every time i want to add a product to the cart
it overwrites my session_variable.
So now i have only the newest variable in the session_variable.
I've tried it with $_REQUEST, $_SESSION, import_request_variables() but
none of them gives me my array back.
Can you help me ?