Hi,
Please can someone help me. This is driving me up the wall!
echo $_SESSION['Cart'][0][$y];
$sql="INSERT INTO BASKET (ORDERID, PRODUCTID, PRODUCTNAME, PRICE)
VALUES ('$orderid','$_SESSION[Cart][0][$y]','$_SESSION[Cart][1][$y]','$_SESSION[Cart][2][$y]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
All its simply trying to do is read three array positions into a MSQL table. $orderid is inputted succsesfully, but the array data isnt. For PRODUCTID and PRICE i get 0 in the database and for PRODUCTNAME i'm getting Array[1][0]. I know the array is holding the data properly because the echo before the insert echos out the right data!
Any help you can give will be much appreciated.