i need to have alot of if else statements but it doesnt seem to let me do this:
$sql = mysql_query("INSERT INTO der (cust_no, order_date)
VALUES ($_SESSION[cust_no], $today) ");
if ($sql)
{
$ordernumber = mysql_insert_id();
echo ($ordernumber);
{
$result = mysql_query("select * from cart where custID = $customerid");
while($row = mysql_fetch_array($result))
{
$insert = mysql_query("INSERT INTO orderline (order_no, product_no, qty)
values ($ordernumber, $row['productId'], $row['qty'])");
}
}
}
I checked each brace and they are all matched up, anyone know why this isnt working?