Well, this is really annoying me! I have been working on this for ages, but can not seem to find any reason why I'm getting the following error;
The code I am using is;
global $sql_username, $sql_password, $sql_host, $sql_database, $debug;
echo <<<TOP_HTML
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<p align="center"><b><font face="Verdana" size="4">List All Emails</font></b></p>
<p align="center"><font face="Verdana" size="2">Please complete the form below
to delete an email.</font></p>
<p align="center"> </p>
<form method="POST">
<input type="hidden" name="do" value="add2">
</form>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="AutoNumber1" fpstyle="9,011111100" style="border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: 1.5pt solid black; background-color: silver">
<tr>
<td width="25%" style="font-weight: bold; color: white; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: 1.5pt solid black; background-color: maroon">
<p align="center"><font face="Arial">Name</font></td>
<td width="25%" style="font-weight: bold; color: white; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: 1.5pt solid black; background-color: maroon">
<p align="center"><font face="Arial">Email</font></td>
<td width="25%" style="font-weight: bold; color: white; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: 1.5pt solid black; background-color: maroon">
<p align="center"><font face="Arial">Subscription Type</font></td>
<td width="25%" style="font-weight: bold; color: white; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: 1.5pt solid black; background-color: maroon">
<p align="center"><font face="Arial">Options</font></td>
</tr>
TOP_HTML;
// set up the connection
$connection = mysql_connect("$sql_host", "$sql_username", "$sql_password");
if (!$connection) { error("Unable to connect with your login info for MySQL", $connection); }
// connect the database
$db = mysql_select_db("$sql_database", $connection);
if (!$db) { error("Unable to execute command", $connection); }
// run the query to get all the email addresses
$query = "SELECT * FROM Ace_Mailing";
$result = mysql_query($query); if (!$result) { $error = mysql_error(); error("Unable to get email list!...Reason: $error", $connection); }
mysql_query($query);
while ($row = mysql_fetch_array ($result)) {
// find out who the author is...
echo "<tr>";
echo "<td width='25%' style='font-weight: bold; color: black; border-style: none; background-color: #FFFFEF'>";
//echo "<p align='center'>" . $row["PersonName"] . "</td>";
echo "<td width='25%' style='color: black; border-style: none; background-color: #FFFFEF'>";
//echo "<p align='center'>" . $row["PersonEmail"] . "</td>";
echo "<td width='25%' style='color: black; border-style: none; background-color: #FFFFEF'>";
//echo "<p align="center">" . $row["SendHTML"] . "</td>";
echo "<td width='25%' style='color: black; border-style: none; background-color: #FFFFEF'>";
echo "<p align='center'>";
//echo "<a href='email.php?do=delete2&email=" . $row["PersonEmail"] . "'>Remove</a></td>";
echo "</tr>";
} // end the while
return $table_show;
mysql_close($connection);
echo <<<END_HTML
<tr>
<td width="25%" style="font-weight: bold; color: black; border-style: none; background-color: #FFFFEF">
<p align="center"> </td>
<td width="25%" style="color: black; border-style: none; background-color: #FFFFEF">
<p align="center"> </td>
<td width="25%" style="color: black; border-style: none; background-color: #FFFFEF">
<p align="center"> </td>
<td width="25%" style="color: black; border-style: none; background-color: #FFFFEF">
<p align="center"> </td>
</tr>
</table>
</center>
</div>
</body>
END_HTML;
}
Anyone got any ideas?
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in c:\program files\nusphere\apache\nsdocs\test\acemailing\emails.php on line 316The code I am using is;
Code:
function list_emails() { global $sql_username, $sql_password, $sql_host, $sql_database, $debug;
echo <<<TOP_HTML
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<p align="center"><b><font face="Verdana" size="4">List All Emails</font></b></p>
<p align="center"><font face="Verdana" size="2">Please complete the form below
to delete an email.</font></p>
<p align="center"> </p>
<form method="POST">
<input type="hidden" name="do" value="add2">
</form>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="AutoNumber1" fpstyle="9,011111100" style="border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: 1.5pt solid black; background-color: silver">
<tr>
<td width="25%" style="font-weight: bold; color: white; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: 1.5pt solid black; background-color: maroon">
<p align="center"><font face="Arial">Name</font></td>
<td width="25%" style="font-weight: bold; color: white; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: 1.5pt solid black; background-color: maroon">
<p align="center"><font face="Arial">Email</font></td>
<td width="25%" style="font-weight: bold; color: white; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: 1.5pt solid black; background-color: maroon">
<p align="center"><font face="Arial">Subscription Type</font></td>
<td width="25%" style="font-weight: bold; color: white; border-left-style: none; border-right-style: none; border-top-style: none; border-bottom: 1.5pt solid black; background-color: maroon">
<p align="center"><font face="Arial">Options</font></td>
</tr>
TOP_HTML;
// set up the connection
$connection = mysql_connect("$sql_host", "$sql_username", "$sql_password");
if (!$connection) { error("Unable to connect with your login info for MySQL", $connection); }
// connect the database
$db = mysql_select_db("$sql_database", $connection);
if (!$db) { error("Unable to execute command", $connection); }
// run the query to get all the email addresses
$query = "SELECT * FROM Ace_Mailing";
$result = mysql_query($query); if (!$result) { $error = mysql_error(); error("Unable to get email list!...Reason: $error", $connection); }
mysql_query($query);
while ($row = mysql_fetch_array ($result)) {
// find out who the author is...
echo "<tr>";
echo "<td width='25%' style='font-weight: bold; color: black; border-style: none; background-color: #FFFFEF'>";
//echo "<p align='center'>" . $row["PersonName"] . "</td>";
echo "<td width='25%' style='color: black; border-style: none; background-color: #FFFFEF'>";
//echo "<p align='center'>" . $row["PersonEmail"] . "</td>";
echo "<td width='25%' style='color: black; border-style: none; background-color: #FFFFEF'>";
//echo "<p align="center">" . $row["SendHTML"] . "</td>";
echo "<td width='25%' style='color: black; border-style: none; background-color: #FFFFEF'>";
echo "<p align='center'>";
//echo "<a href='email.php?do=delete2&email=" . $row["PersonEmail"] . "'>Remove</a></td>";
echo "</tr>";
} // end the while
return $table_show;
mysql_close($connection);
echo <<<END_HTML
<tr>
<td width="25%" style="font-weight: bold; color: black; border-style: none; background-color: #FFFFEF">
<p align="center"> </td>
<td width="25%" style="color: black; border-style: none; background-color: #FFFFEF">
<p align="center"> </td>
<td width="25%" style="color: black; border-style: none; background-color: #FFFFEF">
<p align="center"> </td>
<td width="25%" style="color: black; border-style: none; background-color: #FFFFEF">
<p align="center"> </td>
</tr>
</table>
</center>
</div>
</body>
END_HTML;
}
Anyone got any ideas?
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!