print on top
| From: | Jule Slootbeek | Date: | Wed, 17 Apr 2002 22:38:41 +0000 |
| Subject: | print on top | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-93426@lists.php.net to get a copy of this message | ||
Hey guys and gals,
I'm writing this script for my new webpage, and i'm using MySQL to read and
add news articles to a page, but everytime i add a new article it puts it
under the older one, how can i get it on top?
thanks
Jule
$Link = mysql_connect ($Host, $User, $Password);
$Query = "SELECT * from $TableName";
$Result = mysql_db_query ($DBName, $Query, $Link);
while ($Array = mysql_fetch_array ($Result)) {
print ("<table border=0 align=center valign=top width=100%>");
print ("<tr align=center valign=top>\n");
print ("<td align=left
valign=top><b><i>$Array[header]</i></b></td>\n");
print ("</tr>\n");
print ("<tr align=center valign=top>\n");
print ("<td align=left valign=top>$Array[article]</td>\n");
print ("</tr>\n");
print ("<tr align=center valign=top>\n");
print ("<td align=right valign=top><font size=-2>Posted by: $Array[name] on
$Array[postdate]</font></td>\n");
print ("</tr>\n");
print ("</table>");
--
Jule Slootbeek
jslootbeek@clarku.edu
http://blindtheory.cjb.net