Jump to content

Parse error: parse error, expecting `','' or `';''


Recommended Posts

I'm getting this error when running my php script: Any help is appreciated.

 

Parse error: parse error, expecting `','' or `';'' in C:\xampp\htdocs\order-thankyou0.php on line 59

 

Here is my code:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Order Confirmation</title>
<meta name="keywords" content="" />
<meta name="robots" content="NOINDEX" />
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css" media="screen">
.wrapper-main, #merchantHeader { color: #000000; font-family: Arial, Helvetica, sans-serif; }
html { background-color: #ffffff; }
form fieldset legend, .h2, th, .accent, a, a:link, a:visited, a:hover, .header-tabs, .active { color: #336699; }
</style>
</head>
<body>

<!-- PAGE ERRORS:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' on line 46
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' on line 58
-->

<?php
$message="";
foreach($_POST as $key=>$value){
$message .= $key . '=' . $value . "<br>\n";
}
echo ($message);
?>

<div id="merchantHeader">
<img src="images/logo-pogtrans.gif" alt="PetesOutdoorGrills.com | " style="height: 100px; width: 252px; border-width: 0px;" />

</div> 
<!-- begin main template top -->

<!-- end main template top -->
<div class="wrapper-main" id="mainWrapper">
<div class="wrapper-header-blank"></div>

<!-- BEGIN Page Body -->
<div id="page-body">

<!--
<form action="post">
<fieldset>
<legend>Thanks!</legend>
<p>We have successfully received your information.</p>
</fieldset>
</form>
-->

<!--
Default Thank You URL: www.1shoppingcart.com/app/thankyou.asp?ID=109937
-->

<?php
echo"

<table id="order-thanks">
<tr>
<td>
<h1>Hi $name thank you for your order.</h1>
<p>Your new order ID is $orderID<br />
You will receive your receipt at $email1</p>
</td>
</tr>
</table>

<hr />

<table id="order-details">
<tr>
<td>Order ID:</td>
<td>$orderID</td>
</tr>
<tr>
<td>Order Date:</td>
<td>
print date("l");
echo ", " ;
print date("M");
echo " ";
print date("j"); 
echo ", " ;
print date("Y");
echo ";</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td style="width: 200px;">
Name:<br />
Company:<br />
Email:
</td>
<td style="width: 250px;">
$name<br />
$company<br />
$email1
</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td>
Address1:<br />
Address2:<br />
City:<br />
State:<br />
Zip/Postcode:<br />
Country:<br />
Home Phone:<br />
Work Phone: 
</td>
<td>
$address1<br />
$address2<br />
$city<br />
$state<br />
$zip<br />
$country<br />
$homephone<br />
$workphone
</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><b>Ship to:</b></td>
<td> </td>
</tr>
<tr>
<td class="valign-top">
Name:<br />
Address1:<br />
Address2:<br />
City:<br />
State:<br />
Zip/Postcode:<br />
Country:
</td>
<td>
$shipname<br />
$shipAddress1<br />
$shipAddress2<br />
$shipCity<br />
$shipState<br />
$shipZip<br />
$shipCountry
</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="valign-top"> 
$product1 X $quantity1<br /><br />
Total<br />
$shippingMethod<br />
State Tax<br />
GST<br />
Grand Total 
</td>
<td> 
= $price1<br />
-----------------<br />
= $Total <br />
= $shippingAmount<br />
= $tax<br />
= $gst<br />
= <b>$grandTotal</b>
</td>
</tr>
</table>

";
?>

<div class="actions">
<a href="http://www.petesoutdoorgrills.com"><img src="images/button_continue.gif" alt="Continue" style="border-width: 0px;" /></a>
</div>

</div>
<!-- END Page Body -->

<div class="wrapper-footer">
<div class="left">© <span>2009</span> <a href="</a> - All rights reserved.</div>

<div class="right">

Powered by <a href="http://www.1shoppingcart.com">1ShoppingCart</a>

</div>
</div>
<!--p align="center">1SC-WEB03</p-->

</div>


<SCRIPT LANGUAGE = 'JavaScript'>
<!--
svaid = 204617;
bts_amount = grandTotal;
origin = escape(document.referrer);
-->
</SCRIPT>
<SCRIPT LANGUAGE = 'JavaScript'
SRC="https://www2.higherengine.com/bts/204617/bts.js">
</SCRIPT>
<NOSCRIPT>
<img src="https://www2.higherengine.com/bts/204617/bts.php?svaid=204617&amt=grandTotal" alt="">
</NOSCRIPT>


</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/158834-parse-error-parse-error-expecting-or/
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.