I keep on getting this error with this script
(Parse error: syntax error, unexpected $end in C:\wamp\www\site\checkout.php on line 1).
It worked but suddenly stopped working without the code being altered. Below is the code
Can anyone help me please?
<?php
error_reporting(85);
session_start();
if ( !isset ($_SESSION["gatekeeper"]))
{
header ("LOCATION: signin.htm");
}
$username=$_COOKIE['username'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>U-See Theatre: Buy Tickets Online</title>
<style type="text/css" media="all">
@import "images/usee.css";.style1 {font-size: medium}
.style2 {font-size: small}
</style>
</head>
<body>
<div class="content">
<div id="toph"></div>
<div id="header">
<div class="rside">
<div class="citation">
<h2> </h2>
</div>
</div>
<div class="lside"><img src="images/ball.png" width="174" height="129" /></div>
</div>
<div id="main">
<div class="center">
<?php
if (isset($_POST['checkout']))
{
// Connect to the database
include ("config.inc");
include ("db_connect.inc");
$order_id=rand(10000,32768);
$result=mysql_query("SELECT *
FROM `order`
WHERE username = '$username' and order_id=0
LIMIT 0 , 30");
while ($fetch=mysql_fetch_array($result))
{
$total_price+=$fetch['cost'];
$query="UPDATE `order` SET `order_id` ='".$order_id."' WHERE `order`.`id`='".$fetch['id']."'";
mysql_query($query) or die('cannot run query');
}
mysql_query("INSERT INTO `main_orders` (`order_id` , `username` , `total_price`) VALUES('$order_id' , '$username' ,'$total_price')");
?>
<h2 align="left">Thank You for Order!</h2>
<br/>
<h2 align="left">Total Price(J) :<?php echo $total_price; ?></h2>
<br/>
<p class="citation style1">Your order id is <?php echo $order_id; ?></p>
<br/>
</p>
<p class="citation style1"><span class="style2"><?php echo Thank_you_content; ?></p>
</p>
<?
}
else {
echo '<h2 align="left">You are not supposed to be here.</h2>
<br/>';
}
?>
</div>
<div class="leftmenu">
<div class="nav">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="events.php">Events</a></li>
<li><a href="#">Theatre</a></li>
<li><a href="#">Contact Us </a></li>
</ul>
</div>
<div class="padding">
<p class="citation style1"><span class="style2">Logged in as</span>: <?php echo"$username";?> </p>
<h3><a href="logoff.php">Log Out </a></h3>
<p><a href="logoff.php"></a></p>
<p><a href="cart.php"><b>View Cart</B></a></p>
<p><br />
</p>
<hr />
<h2><br />
</h2>
</div>
</div>
</div>
<br /> <br />
<div id="footer">Copyright © 2007 U-See Theatre | Design: <a href="mailto:yamal_85@hotmail.com?subject=U-See Theatre">Yamal Sebtaoui </a> |
<a href="#">Contact</a> |</div>
</div>
</body>
</html>