ambo Posted February 24, 2009 Share Posted February 24, 2009 This code spits them out vertiacly i cant get them to go horizontal <? if(!defined('TBL_ACTIVE_USERS')) { die("Error processing page"); } $q = "SELECT username FROM ".TBL_ACTIVE_USERS ." ORDER BY RAND()"; $result = $database->query($q); /* Error occurred, return given name by default */ $num_rows = mysql_numrows($result); if(!$result || ($num_rows < 0)){ echo "Error displaying info"; } else if($num_rows > 0){ /* Display active users, with link to their info */ echo "<table align=\"left\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; echo "<tr><td><font size=\"2\">\n"; for($i=0; $i<$num_rows; $i++){ $uname = mysql_result($result,$i,"username"); echo "<div align=\"center\"><a href=\"profile.php?user=$uname\">" ."<img src=\"../image.php?id=$uname\" width=\"50\" height=\"50\" border=\"0\"/></a><br>" ."<a href=\"profile.php?user=$uname\">$uname</a></div>"; } echo "</font></td></tr></table><br>\n"; } ?> Link to comment https://forums.phpfreaks.com/topic/146634-display-database-data-horizontaly/ Share on other sites More sharing options...
ambo Posted February 24, 2009 Author Share Posted February 24, 2009 HELP? Link to comment https://forums.phpfreaks.com/topic/146634-display-database-data-horizontaly/#findComment-769850 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.