Jump to content

[SOLVED] parse error


Lassie

Recommended Posts

I have an error I cant solve at the conclusion of my script.

any pointers appreciated.

 

 

error is on last line as follows:- Parse error: parse error, unexpected $ in c:\easyserv\www\e_cart11\cheque_2.php on line 76

 

 

$book = array();
 foreach ($cart as $product_id => $qty)
  {
    $book[] = get_book_details($product_id);
    
  }
$book_list ="";
foreach($book as $single_book)
{
	extract($single_book);
	$book_list.=$title." by ".$author."\n";
}
  	
$to = "$email";
$subj = "test";
$mess = "<html>\n"
."<head>\n"
."<title>Test Mail</title>\n"
."</head>\n"
."<body>\n"
."This is an html email test<br />\n"
."<p><b>Your order has been processed. Please print this email as your reference</b></p>\n"
."<p>Your purchases were:-\n"
.$book_list."</p></body>\n</html>\n";

$mess = wordwrap($mess,70);

$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

 mail($to,$subj,$mess,$headers);

display_cart($_SESSION['cart'], false, 1);


	//empty shopping cart
      session_destroy();
      echo '<div id="cheque">';
      echo '<p>Thank you for shopping with us.</br>  Your order has been placed.</p></div>';
      echo '</br></br>';
      display_button('index.php', 'continue-shopping', 'Continue Shopping'); 
//	  display_button ('pick_up.php','b_buy','Pick Up Purcahse'); 
	 echo '</br></br>';
		do_html_footer();
?>/*error line*/

Link to comment
https://forums.phpfreaks.com/topic/47265-solved-parse-error/
Share on other sites

Archived

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.