Note - form was incomplete, no new data added.

\n"; } $selectquery1 = " SELECT HG02.id, HG02.added, HG02.name, HG02.email, HG02.comment FROM HG02"; $selectquery2 = " SELECT HG02.name, HG02.email, HG02.comment FROM HG02"; $selectquery3 = " SELECT HG02.id, DATE_FORMAT(HG02.added, '%b %D, %Y (%h:%i %p)') AS added, HG02.name, HG02.email, HG02.comment FROM HG02"; // uncomment the query you want to use // use $selectquery1 if you want ALL data from table printed // use $selectquery2 if you want only email and comment printed // use $selectquery3 if you want all the data but a formatted "added" column # $selectquery = $selectquery1; # $selectquery = $selectquery2; $selectquery = $selectquery3; if (!$result = mysql_query($selectquery, $link)) { die("Could not perform SELECT query"); } /* Printing results in HTML */ /* COMMENTED 2002-05-02 BY EPRICE print "\n"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { print "\t\n"; foreach ($line as $col_value) { print "\t\t\n"; } print "\t\n"; } print "
$col_value
\n"; */ while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { printf("
\n
DateNameEmail
%s%s%s
\n
Comment
%s


\n", $row['added'], $row['name'], $row['email'], $row['comment']); } /* Free resultset */ mysql_free_result($result); /* Close the database connection */ mysql_close($link); ?>