Help - Search - Members - Calendar
Full Version: Prolems with script
Weborum Webmaster Forum > Web Page Design > PHP
THYRAXX
<php?
while ($comment = mysql_fetch_array($comments));
{
echo "<p class=\"viewcomment\">" . $comment['commentText'] . "<br />\n";

echo "Posted by: ";
if($comment['commentName'] == '') { echo "anonymous</p>";
}
elseif { ($comment['commentWeb'] == '' && $comment['commentName'] != '');
}
echo $comment['commentName'] . "</p>";
}
else { $url = $comment['commentWeb']; if (substr($url, 0, 7) != "http://")
{ $url = "http://" . $url;
}
echo "<a href=" . $url . "> . $comment['commentName']."</"a></'p>";
}
}
?>

and this one:

<php?
$monthnames = array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
if($archive = mysql_query("SELECT DISTINCT month(entryDate) AS month, year(entryDate) AS year, CONTC(year(entryDate),month(entryDate)) AS ym FROM tblEntries ORDER BY ym DESC"));
{
while ($dates = mysql_fetch_array($archive));
}
{
print "<li><a href=" archive.php? month=" . $dates['month'] . "&amp;year=" . $dates['year'] . "> . $monthnames[$dates['month']] . " - " . $dates['year'] . </"a></"li>";
}
mysql_close($conn);

?>
sjthomas
Can you tell us what sort of errors you are getting?
THYRAXX
Parse error: parse error, unexpected $end on line 205
While there's no line 205
Joe
Is that all the code that appears on the page?
THYRAXX
yes thats all
Joe
Where's your query and database connection for the first part of the script?
THYRAXX
only in these sections it shows that here the error is, but i can't see what is wrong with the script. The rest works because those are tested snippets i used. And a database connection is just a simple script.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.