Jump to content

unexpected T_VATRIABLE


bravo14

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

 

 

 
<?php
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");
exit;
}
 
$pageTitle   = 'Checkout Completed Successfully';
//require_once 'include/header.php';
//get order details
$order_id=$_SESSION['order_id'];
$order_sql=mysql_query("SELECT * FROM `tbl_order` where `od_id` = '$order_id'");
$order_row=mysql_fetch_assoc($order_sql);
$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"
.$order_row['od_shipping_address1']."\n"
.$order_row['od_shipping_address2']."\n"
.$order_row['od_shipping_city']."\n"
.$order_row['od_shipping_state']."\n"
.$order_row['od_shipping_postal_code']."\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());
if(mysql_num_rows($order_items_sql)==0){
echo"No order items";
}
else{
while($order_items_row=mysql_fetch_assoc($order_items_sql)){
Line 47 - $order_items=$order_items_row['od_qty'].' x '.$order_items_row['pd_name'].'@'$order_items_row['pd_price'];
}
}
$mesage_content=$message_intro.$order_items; 
 
//send confirmation email
$subject="Thank you for your order"
$email=$order_row['od_email'];
$message=$message_content;
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");
}
 
 
unset($_SESSION['orderId']);
?>
 

 

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
Edited by jazzman1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.