ok here goes, I have got a script which allows me to store quantity of the product, the customer id and day in a mysql database. That bit works fine, but I also want to store payment and delivery information but I get the error:
Parse error: parse error, unexpected T_STRING on line 21
<html>
<head></head>
<body>
<?php include('loginCheck.php');
$dbcnx = myConnect();
$query = "SELECT $table_basket.PROD_ID, $table_basket.CUST_ID, QUANTITY
FROM $table_basket, $table_users
WHERE $table_basket.CUST_ID = $table_users.CUST_ID
AND $table_users.USERNAME = \"$User\"";
$result=mysql_query($query);
if (! $result) printf ("Error: %s<br>", mysql_error ());
for ($i = 0; $i < mysql_num_rows ($result); $i++) {
$row = mysql_fetch_row($result);
$cust_id = $row[1];
$query = "INSERT INTO $table_order (SET PROD_ID,QUANTITY,CUST_ID,DAY,USERNAME,CREDIT_CARD,CARDHOLDER_NAME,CARDNUMBER,EXPIRATION_DATE,ADDRESS 1,ADDRESS2,CITY,COUNTY,POST_CODE)
values ('$row[0]','$row[2]','$row[1]','date("Ymd")','$row[3]','$row[4]','$row[5]','$row[6]','$row[7]','$row[8]','$row[9]','$row[10]','$row[11]','$row[12])";
if (! $result2) printf ("Error: %s<br>", mysql_error ());
};
if (mysql_num_rows ($result)>0) {
$query = "DELETE FROM $table_basket
WHERE $table_basket.CUST_ID = $cust_id";
$result=mysql_query($query);
if (! $result) printf ("Error: %s<br>", mysql_error ());
};
echo("ORDER SUBMITTED");
include('navigation.php');
?>
</body>
</html>
I hope someone can help,
thank you in advance๐