the script is a simple shopping cart.
I keep adding new items to the cart (add.php) using this code:
$_SESSION['productid'][] = $productid;
$_SESSION['prod_name'][] = $prod_name;
and then I list the items in the cart (showcart.php) using this code:
$_SESSION['array_len'] = count ($_SESSION['productid']);
for ($i = 0; $i < $_SESSION['array_len']; $i++) {
echo"Prod. ID: " . $_SESSION['productid'][$i];
echo"Prod. Name: " . $_SESSION['prod_name'][$i];
}
etc...
it works fine on my local machine all the time.
it works fine on the server the first time i load the page containing this script (add.php) . after that it gives the fatal string error.