I put the following code in a CGI shopping cart and am getting errors. Anyone have any ideas.
## includes
include("config.php"
## check login
## connect and execute query
$connection = mysql_connect($hostname, $user, $pass) or die ("Unable to connect!"
$query = "SELECT * from $frmtable WHERE EID = '$Econ_BillTffice_EmployeeNumber'AND LName = '$Econ_ShipTo_Postal_Name_Last'";
$result = mysql_db_query($database, $query, $connection) or die ("Error in
query: $query. " . mysql_error());
## if row exists - login is correct
if (mysql_num_rows($result) == 1)
{
##display user details
$row = mysql_fetch_array($result);
$total_points = $row[3];
$points_used = $row[6];
$tpavail = $row[7];
<TABLE WIDTH="100%" BORDER="1" ALIGN="center">
<TR>
<TD WIDTH="18%" ALIGN="center">Last Name</TD>
<TD WIDTH="17%" ALIGN="center">First Name</TD>
<TD WIDTH="15%" ALIGN="center">Total Points</TD>
<TD WIDTH="15%" ALIGN="center">May</TD>
<TD WIDTH="15%" ALIGN="center">June</TD>
<TD WIDTH="10%" ALIGN="center">Points Used</TD>
<TD WIDTH="10%" ALIGN="center">Total Points Available</TD>
</TR>
<TR>
print "<TD>$row[1]</TD>";
print "<TD>$row[2]</TD>";
print "<TD>$row[3]</TD>";
print "<TD>$row[4]</TD>";
print "<TD>$row[5]</TD>";
print "<TD>$row[6]</TD>";
print "<TD>$row[7]</TD>";
mysql_free_result ($result);
## close connection
mysql_close($connection);
</TD></TR></TABLE>
else
## login/pass check failed
{
mysql_free_result ($result);
mysql_close($connection);
## redirect to error page
##header("Location: error.php?ec=0"
exit;
}
## includes
include("config.php"
## check login
## connect and execute query
$connection = mysql_connect($hostname, $user, $pass) or die ("Unable to connect!"
$query = "SELECT * from $frmtable WHERE EID = '$Econ_BillTffice_EmployeeNumber'AND LName = '$Econ_ShipTo_Postal_Name_Last'";
$result = mysql_db_query($database, $query, $connection) or die ("Error in
query: $query. " . mysql_error());
## if row exists - login is correct
if (mysql_num_rows($result) == 1)
{
##display user details
$row = mysql_fetch_array($result);
$total_points = $row[3];
$points_used = $row[6];
$tpavail = $row[7];
<TABLE WIDTH="100%" BORDER="1" ALIGN="center">
<TR>
<TD WIDTH="18%" ALIGN="center">Last Name</TD>
<TD WIDTH="17%" ALIGN="center">First Name</TD>
<TD WIDTH="15%" ALIGN="center">Total Points</TD>
<TD WIDTH="15%" ALIGN="center">May</TD>
<TD WIDTH="15%" ALIGN="center">June</TD>
<TD WIDTH="10%" ALIGN="center">Points Used</TD>
<TD WIDTH="10%" ALIGN="center">Total Points Available</TD>
</TR>
<TR>
print "<TD>$row[1]</TD>";
print "<TD>$row[2]</TD>";
print "<TD>$row[3]</TD>";
print "<TD>$row[4]</TD>";
print "<TD>$row[5]</TD>";
print "<TD>$row[6]</TD>";
print "<TD>$row[7]</TD>";
mysql_free_result ($result);
## close connection
mysql_close($connection);
</TD></TR></TABLE>
else
## login/pass check failed
{
mysql_free_result ($result);
mysql_close($connection);
## redirect to error page
##header("Location: error.php?ec=0"
exit;
}