Error connecting to database!\n"); exit; } // query with sort on data and then // span rows here $query = "select * from entries;"; if(!($result=mysql_query($query,$conn))) { mysql_close($conn); exit; } $numrows=mysql_num_rows($result); if($numrows < 1) { mysql_close($conn); exit; } if( ($data=mysql_fetch_array($result, MYSQL_ASSOC)) ) { echo ("\n"); // generate table rows do { echo (""); } while(($data=mysql_fetch_array($result, MYSQL_ASSOC))); echo ("
\n"); // display rows here.. printf("Posted by %s%s on " . $data['date'] . " at " . $data['time'] . "\n", ($data['nick']) ? $data['nick']:"Chicken-shit", ($data['host']) ? " (" . $data['host'] . ")" : ''); echo("
" . $data['text'] . "\n"); if($data['www'] || $data['email']) echo("
\n"); $comma_req = 0; if($data['email']) { echo("E-Mail: " . $data['email'] . "\n"); $comma_req = 1; } if($data['www']) { if($comma_req == 1) echo (", \n"); echo("URL: " . $data['www'] . "\n"); } echo("
\n"); echo ("
\n"); } mysql_close($conn); } ?>
\n"); echo(" \n"); echo("\n"); } ?>
© 2000 HMetalSoft (come and visit us in #main on ExodusIRC!)