// Set the page title
$title = "Last - Home";

// Set the Description Meta Data
$dmeta = "Description Meta Data";

// Set the Keyword Meta Data
$kmeta = "Keyword Meta Data";

// Require the class fil

// Require the News Page System

// Require the header file

$blog = $_GET['blog'];

// Connect to MySQL
$db = & new MySQL($host,$dbUser,$dbPass,$dbName);

if (isset($blog)) {

// Set up the query...
$gdnps = "SELECT id, author, title, msg, email, DATE_FORMAT(date, '%h:%i - %m.%d.%y'), blog";
$gdnps .= " FROM gdnps WHERE blog='$blog' ORDER BY id DESC LIMIT $from, $max_results";

// Perform said query
$result = $db->query($gdnps);
while ($row = $result->fetch()) {

$id = $row['id'];
$entryauthor = $row['author'];
$entrytitle = $row['title'];
$entrytext = $row['msg'];
$email = $row['email'];
$date = $row['date'];
$blog2 = $row['blog'];

// Grab a count...
$csql = "SELECT * FROM comments WHERE news_id='$id' ";
$cresult = $db->query($csql);

	// Build the output right here
echo "<div class=\"title\">$entrytitle</div>";

echo "<div class=\"normal\">[ Posted by $entryauthor @ $date | ";
echo "<a href=\"comments.php?id=$id\" class=\"doc\">Read</a> / ";
echo "<a href=\"reply.php?id=$id\" class=\"doc\">Reply</a> / ".$cresult->size()." Replies ] </div>";

} else { 

// send a query to the mySQL database
$sql = "SELECT id, blog FROM blog ORDER BY blog ASC";
$result2 = $db->query($sql);

while ($row2 = $result2->fetch()) {
$id2 = $row2['id'];
$blog3 = $row2['blog'];

echo "<div class=\"title\">Current List of Blogs</div>";
echo "<div class=\"normal\">$blog3 -> <a href=\"blog.php?blog=$blog3\" class=\"doc\">Click here to view</a> <br /></div>";



Okay, now it works.. but I can't get the $date var to show up;
I have a simular problem on nearly the same code for a different
page, which shows a news post + the comments below it.

Any idea what I'm doing wrong??
(And yes, I know its not good code w/ all the $var = $row['blah'] but I'm lazy, forgive me)