blazer19 Posted April 17, 2010 Share Posted April 17, 2010 Hi i am currently getting these errors when trying to set up an ecommerce site Warning: Cannot use a scalar value as an array in /homes/06020478/www/add_item.php on line 8 Warning: Cannot modify header information - headers already sent by (output started at /homes/06020478/www/add_item.php: in /homes/06020478/www/add_item.php on line 9 Here is my code <?php $prod_id = $_GET['id']; if($_SESSION['CART'][$prod_id]) { header ('location:purchasing.php?error=1'); }else{ $_SESSION['CART'][$prod_id] = true; header ('location:basket.php'); } ?> I would be so greatful to any ideas as to what the problem is Thanks Link to comment https://forums.phpfreaks.com/topic/198875-warning-cannot-use-a-scalar-value-as-an-array-in/ Share on other sites More sharing options...
blazer19 Posted April 17, 2010 Author Share Posted April 17, 2010 more info here is the url http://sots.brookes.ac.uk/~06020478/purchasing.php the problem happens when i try to add a product to the basket Link to comment https://forums.phpfreaks.com/topic/198875-warning-cannot-use-a-scalar-value-as-an-array-in/#findComment-1043924 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.