Lassie Posted April 16, 2007 Share Posted April 16, 2007 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*/ Quote Link to comment Share on other sites More sharing options...
soycharliente Posted April 16, 2007 Share Posted April 16, 2007 I see nothing wrong. I noticed there was no opening <?php tag. Is there more code above? Quote Link to comment Share on other sites More sharing options...
trq Posted April 16, 2007 Share Posted April 16, 2007 Its really hard to tell with your indentation as it is, but this usually meens your missing a closing } Quote Link to comment Share on other sites More sharing options...
Lassie Posted April 16, 2007 Author Share Posted April 16, 2007 Yes there is more code and looking at it I have found the missing brace. Thanks guys Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.