---mainfile> require ("required.php"); ?>
/* Load the tagboard, the X number of most recent posts */ $SQL = "SELECT * FROM $tablname ORDER BY id LIMIT $howmany"; $results = mysql_db_query($database, "$SQL", $connection); if (!$results) return ("ERROR: " . mysql_error() . "\n$SQL\n"); while ($row = mysql_fetch_array($results)) { $tag_id = $row["id"]; $nick = $row["nick"]; $url = $row["url"]; $message = $row["message"]; $datetime = $row["datetime"]; /* Some people don't have web sites, so we check to see if they put a URL in the database */ if ($url=="" or $url=="http://") /* If they didn't then we just display the nick and the message */ $url = " "; else /* If they did, then we link it!! */ $url = "($url)"; if ($timestamping == 1) echo "$tag_id) $nick $url