Forum Moderators: coopster
//$result holds all the registered users
$sql="SELECT username FROM registeredusers ORDER BY id";
$result=mysql_query($sql);
//while statement to keep outputting results, but it only outputs in 1 single column?
while($info=mysql_fetch_array($result))
{
$username = $info['username'];
$avatarPath = $dbConn->getDefaultAvatar($username);//gets path of user's picture
if($avatarPath == null){//if user has no picture, then display nothing
$myProfilePic2 = "<img src='".$avatarPath."' height=70px width=70px alt=UserPic />";
}else{
$myProfilePic2 = "<img src='".$avatarPath."' height=70px width=70px alt=UserPic />";
}
$this->data .='
<table id="userPost" width="300px">
<tr>
<td width="300px">
<td width="100px"><a class="mainPage" href="profile.php?username='.$username.' ">'.$myProfilePic2.'</a></td>
<td width="200px">
<table width="200px" height="10px">
<tr class="userPictures"><td width="25px"></td></td><td>'.$username.'</td></tr>
<tr class="userPictures"><td width="25px"></td><td>city</td></tr>
<tr class="userPictures"><td width="25px"></td><td>stats</td></tr>
</table>
</td>
</td>
</tr>
</table><div id="spacerH5"></div>
';
}