I have a frustrating problem. I have a shopping cart class that creates
session variable arrays to store the product_id and quantity. My development
machine is running windows 2000 with PHP 4.3.3 and my script is working
perfectly on my machine. When I upload to the remote host running FreeBSD
and PHP 4.3.2 I am getting errors. I believe I am having problems with
assigning the array values, and this is causing other problems. I am using
this statment to assign $_SESSION['cart']['product_id'] with the quantity
using a class with the add_item property.

 $cart->add_item($_GET['product_id'], $_GET['quantity']);

I am getting this error.

Warning: Cannot use a scalar value as an array in
/home/designor/public_html/class.php on line 14
Warning: Cannot use a scalar value as an array in
/home/designor/public_html/class.php on line 16

I have no idea what a scalar value even is. I did verify that my form was
passing the values by using
echo $_GET['product_id'] . $_GET['quantity'];

Your help is much appreciated, as I am still a beginner.

Steve Turner

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to