PDA

View Full Version : Yet more help


Serge
03-15-2003, 05:38 PM
Ok I need more help so far I have this script/page:


<?php
include ("sql.php");

$id = $_REQUEST['id'];

$result = mysql_query("SELECT articleid, title, email, author, body, commentid FROM article WHERE articleid = $id") or
die (mysql_error());

while ($row = mysql_fetch_array($result))
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<head>
<title>Surrix - <?php echo $row["title"]; ?></title>
<style type="text/css">
A:link, A:visited, A:active {
COLOR: #C9CCD1;
TEXT-DECORATION: underline;
}
A:hover {
COLOR: #8CA3C6;
BACKGROUND-COLOR: #485363;
}
</style>
</head>

<body bgcolor="#273549">
<center><img src="logo.jpg"><br></center>
<table bgcolor="#273549" width="900" cellpadding="10" cellspacing="0" border="0">
<tr><td align='center' width =' 150' valign='top'>

<table border="0" cellspacing="0" cellpadding="0" width="150">
<tr>
<td bgcolor="#CDCBCB" >
<table width="150" border="0" cellspacing="1" cellpadding="3">
<tr>
<td valign="top" bgcolor="#272F3B">&nbsp;<font color="#FFFFFF"><b>Main Menu</b></font>
</td>
</tr>
<tr>
<td bgcolor="#7A8595"><font face="verdana,arial,helvetica" size="1" ><font face="verdana,arial,helvetica" size="1" ><strong><big>?</big></strong> <a href="/index.php">Home</a><br>

<strong><big>?</big></strong> <a href="http://www.surrix.net/forums/index.php">Forums</a><br>
<strong><big>.</big></strong> <a href="http://www.surrix.net/db/">Articles Database</a><br>
<strong><big>?</big></strong> <a href="http://www.surrix.net/links.php">Web Links</a><br>
<strong><big>?</big></strong> <a href="http://www.surrix.net/forums/vbstats.php">Stats</a><br>
</td>
</tr>
</table>
</td>

</tr>
</table>

<td valign="top" align="center" width="100%"><table cellpadding="0" cellspacing="0" border="0" bgcolor="000000" align="center" width="100%">
<tr><td vAlign="top" bgColor="000000" width="100%">
</td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td bgcolor="#FFFFFF" >

<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td bgcolor="#272F3B">&nbsp;<font color="#FFFFFF"><b><?php echo "" . $row["title"] . " By: <a href=\"mailto:" . $row["email"] . "\">" . $row["author"] . "</a>"; ?></b></font>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font face="verdana,arial,helvetica" size="1" ><table border='0' cellspacing='0' cellpadding='0' width='100%'>
<tr>
<td bgcolor='#CDCBCB' width='100%' >
<table width='100%' border='0' cellspacing='1' cellpadding='3'>

<tr>
<th bgcolor='#7A8595' width='100%' align='right'>

<table width='100%' border='0' cellspacing='0' cellpadding='0' bordercolor='#FFFFFF'>
<tr><td bgcolor='#7A8595' valign='top' align='justify' bordercolor='#FFFFFF'>
<?php echo $row["body"];
echo "<a href=\"http://www.surrix.net/forums/newreply.php?action=newreply&threadid=" . $row["commentid"] . "\">Comment on this article</a>";
mysql_free_result($result);
?>


And I get this error when I run it:

Parse error: parse error in /home/surrix/public_html/db/read.php on line 83


Line 83 is the last line of the above code which I don't think there is anything wrong with it. So could someone please help me with it.

mr e
03-15-2003, 05:43 PM
your missing the closing } for the while statement :)

lynda
03-15-2003, 05:43 PM
You did not end your while loop.

Put a closing bracket } before your mysql_free_result()

lynda
03-15-2003, 05:43 PM
I am so not quick enough! :)

Serge
03-15-2003, 05:44 PM
Ok thanks.

filburt1
03-15-2003, 06:02 PM
Just a request: if you post that many lines of code, please attach it as a file instead for better readability.