little help with $row
Posted: Fri Jul 16, 2010 4:20 pm
ok im using $row and while to display all the users on the page. and i want to make it so there is a link for each user that if you click it, it will have you go to a new page with only that users states and info is displays.
Here is the code i have for the users page.
Here is the code i have for the users page.
Code: Select all
<?
$userlist = mysql_query("SELECT * FROM users");
echo '<table border="1" width=100%>
<tr>
<th width="50">Picture</th>
<th width="50">ID#</th>
<th>Username</th>
<th>LVL</th>
<th>Rank</th>
<th width="100"><center>Click to Fight.</center></th>
</tr>';
while($row = mysql_fetch_array($userlist))
{
echo "<tr>";
echo '<td width="50"><center><img width="50" height="50" src="' . $row['pictures'] .'"/></center> </td>';
echo '<td width="50"><center>' . $row['id'] . "</center></td>";
echo "<td><center>" . $row['username'] . "</center></td>";
echo "<td><center>" . $row['lvl'] . "</center></td>";
echo "<td><center>" . $row['rank'] . "</center></td>";
echo '<td width="100"><center><a href="index.php?page=fightpage">Fight <br/>'.$row['username'].'</a></center></td>';
echo "</tr>";
}
echo "</table>";
?>