about2flip
Technical User
I am getting a parse error '<' on Line 7. I can not see it. Can someone help me out and tell me where it is.
<?
$page_title ="EXDQ TRUCKING ADMIN";
include ('includes/header.html');
?>
<h1 id="mainhead">Expedited Trucking Admin</h1>
<?
echo 'Today is ' .date('l') . ' . The current Time is ' . date ('g:i a') .'.';<br>
?>
<?
if ((!$_POST[shipperorg]) || (!$_POST[origincity]) || (!$_POST[originstate])
|| (!$_POST[destcity]) || (!$_POST[deststate]) || (!$_POST[loadtype]) || (!$_POST[equiptype])) {
header( "Location: exit;
}
include("dbinfo.php");
$table_name = "loads";
// open connection
$connection = mysql_connect($host, $username, $password) or die ("Unable to connect!");
// select database
mysql_select_db($database) or die ("Unable to select database!");
// create query
$query = "INSERT INTO $table_name (shipperorg, pickupdate, origincity, originstate, destcity, deststate, loadtype, equiptype, weight, miles) VALUES ('$_POST[shipperorg]', '$_POST['$year:$month:$day']', '$_POST[origincity]', '$_POST[originstate]', '$_POST[destcity]', '$_POST[deststate]', '$_POST[loadtype]', '$_POST[equiptype]', '$_POST[weight]', '$_POST[miles]')";
// execute query
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
// print message with ID of inserted record
echo "New record inserted with ID ".mysql_insert_id();
// close connection
mysql_close($connection);
?>
<head>
<title>Untitled Document</title>
</head>
<body>
<p>
<h1> Adding Information to <? echo "$table_name"; ?>
</h1>
</p>
<table width="316" border="0">
<tr>
<td width="161"><strong>Shipper Origin:</strong></td>
<td width="145"><? echo "$_POST[shipperorg]"; ?></td>
</tr>
<tr>
<td><strong>Pick Date: </strong></td>
<td><? echo "$_POST[$year:$month:$day]"; ?></td>
</tr>
<tr>
<td><strong>Origin City: </strong></td>
<td><? echo "$_POST[origincity]"; ?></td>
</tr>
<tr>
<td><strong>Origin State: </strong></td>
<td><? echo "$_POST[originstate]"; ?></td>
</tr>
<tr>
<td><strong>Destination City: </strong></td>
<td><? echo "$_POST[destcity]"; ?></td>
</tr>
<tr>
<td><strong>Destination State: </strong></td>
<td><? echo "$_POST[deststate]"; ?></td>
</tr>
<tr>
<td><strong>Load Type: </strong></td>
<td><? echo "$_POST[loadtype]"; ?></td>
</tr>
<tr>
<td><strong>Equipment Type: </strong></td>
<td><? echo "$_POST[equiptype]"; ?></td>
</tr>
<tr>
<td><strong>Weight</strong></td>
<td><? echo "$_POST[weight]"; ?></td>
</tr>
<tr>
<td><strong>Miles</strong></td>
<td><? echo "$_POST[miles]"; ?></td>
</tr>
</table>
<p><a href="newloads.html">Add Another Record</a></p>
<p><br>
</p>
</body>
</html>
<?
$page_title ="EXDQ TRUCKING ADMIN";
include ('includes/header.html');
?>
<h1 id="mainhead">Expedited Trucking Admin</h1>
<?
echo 'Today is ' .date('l') . ' . The current Time is ' . date ('g:i a') .'.';<br>
?>
<?
if ((!$_POST[shipperorg]) || (!$_POST[origincity]) || (!$_POST[originstate])
|| (!$_POST[destcity]) || (!$_POST[deststate]) || (!$_POST[loadtype]) || (!$_POST[equiptype])) {
header( "Location: exit;
}
include("dbinfo.php");
$table_name = "loads";
// open connection
$connection = mysql_connect($host, $username, $password) or die ("Unable to connect!");
// select database
mysql_select_db($database) or die ("Unable to select database!");
// create query
$query = "INSERT INTO $table_name (shipperorg, pickupdate, origincity, originstate, destcity, deststate, loadtype, equiptype, weight, miles) VALUES ('$_POST[shipperorg]', '$_POST['$year:$month:$day']', '$_POST[origincity]', '$_POST[originstate]', '$_POST[destcity]', '$_POST[deststate]', '$_POST[loadtype]', '$_POST[equiptype]', '$_POST[weight]', '$_POST[miles]')";
// execute query
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
// print message with ID of inserted record
echo "New record inserted with ID ".mysql_insert_id();
// close connection
mysql_close($connection);
?>
<head>
<title>Untitled Document</title>
</head>
<body>
<p>
<h1> Adding Information to <? echo "$table_name"; ?>
</h1>
</p>
<table width="316" border="0">
<tr>
<td width="161"><strong>Shipper Origin:</strong></td>
<td width="145"><? echo "$_POST[shipperorg]"; ?></td>
</tr>
<tr>
<td><strong>Pick Date: </strong></td>
<td><? echo "$_POST[$year:$month:$day]"; ?></td>
</tr>
<tr>
<td><strong>Origin City: </strong></td>
<td><? echo "$_POST[origincity]"; ?></td>
</tr>
<tr>
<td><strong>Origin State: </strong></td>
<td><? echo "$_POST[originstate]"; ?></td>
</tr>
<tr>
<td><strong>Destination City: </strong></td>
<td><? echo "$_POST[destcity]"; ?></td>
</tr>
<tr>
<td><strong>Destination State: </strong></td>
<td><? echo "$_POST[deststate]"; ?></td>
</tr>
<tr>
<td><strong>Load Type: </strong></td>
<td><? echo "$_POST[loadtype]"; ?></td>
</tr>
<tr>
<td><strong>Equipment Type: </strong></td>
<td><? echo "$_POST[equiptype]"; ?></td>
</tr>
<tr>
<td><strong>Weight</strong></td>
<td><? echo "$_POST[weight]"; ?></td>
</tr>
<tr>
<td><strong>Miles</strong></td>
<td><? echo "$_POST[miles]"; ?></td>
</tr>
</table>
<p><a href="newloads.html">Add Another Record</a></p>
<p><br>
</p>
</body>
</html>