<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'] . "&year=" . $dates['year'] . "> . $monthnames[$dates['month']] . " - " . $dates['year'] . </"a></"li>";
}
mysql_close($conn);
?>