Jump to content

unexpected T_VATRIABLE


Recommended Posts

Hi Guys


I have checked the code over and over and have probably become word blind at the moment, I am getting an error saying


Parse error syntax error, unexpected T_VARIABLE in /home/sites/Lucyslunchbox.co.uk/public_html/success.php on line 47





from the following code



require_once 'library/config.php';
require_once 'library/cart-functions.php';
require_once 'library/checkout-functions.php';
// if no order id defined in the session
// redirect to main page
if (!isset($_SESSION['orderId'])) {
header("Location: http://www.lucyslunchbox.co.uk");
$pageTitle   = 'Checkout Completed Successfully';
//require_once 'include/header.php';
//get order details
$order_sql=mysql_query("SELECT * FROM `tbl_order` where `od_id` = '$order_id'");
$message_intro="Dear ".$order_row['od_shipping_first_name']."\n\n
Thank you for your order\n\n
Your order will be delivered to:\n"
on ".date("d-M-Y", strtotime($order_row['delDate']))."\n";
$order_items_sql=mysql_query("SELECT od_id, od.pd_id, od_qty, pd_name, pd_price, pd_thumbnail, pd.cat_id
FROM tbl_order_item od, tbl_product pd, tbl_category cat
WHERE od_id = '$order_id' AND od.pd_id = pd.pd_id AND cat.cat_id = pd.cat_id ")or die(mysql_error());
echo"No order items";
Line 47 - $order_items=$order_items_row['od_qty'].' x '.$order_items_row['pd_name'].'@'$order_items_row['pd_price'];
//send confirmation email
$subject="Thank you for your order"
mail($email, $subject, $message, "From: orders@lucyslunchbox.co.uk\r\nReturn-path: orders@lucyslunchbox.co.uk");
// send notification email
if ($shopConfig['sendOrderEmail'] == 'y') {
$subject = "[New Order] " . $_SESSION['orderId'];
$email   = $shopConfig['$sc_order_email'];
$message = "You have a new order. Check the order detail here \n http://" . $_SERVER['HTTP_HOST'] . WEB_ROOT . 'admin/order/index.php?view=detail&oid=' . $_SESSION['orderId'] ;
mail($email, $subject, $message, "From: $email\r\nReturn-path: $email");


Any help would be great

Link to comment
Share on other sites

My IDE says:

$order_items=$order_items_row['od_qty'].' x '.$order_items_row['pd_name'].'@'$order_items_row['pd_price']; //worng

$mesage_content=$message_intro.$order_items //wrong
$order_items=$order_items_row['od_qty'].' x '.$order_items_row['pd_name'].'@'.$order_items_row['pd_price']; //correct

$mesage_content=$message_intro.$order_items; //correct
Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.