Hey.
ive posted my code below.
im trying to compose a table of details. the details will be the users in my database.
i want to have SOME of their information on display, but not all (like, not emails and passwords)
also, i’d like the username to be a link to a stats page with more detailed info on.
the script below seems to do all of that fine, except the link part.
the link will be www.myurl.com/stats.php?id= and then a user id.
the first entry’s link works, but none of the other’s do.
any ideas?
decfor
$getlinks = mysql_query("SELECT id FROM contacts");
$getdetails = mysql_query("SELECT * FROM contacts");
$numrows = mysql_num_rows($getdetails);
$usersdetails = mysql_fetch_array($getdetails);
$userlinks = mysql_fetch_array($getlinks);
echo"Number of rows: ".$numrows."<br><br>";
echo"<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">";
for ($i=0; $i < $numrows; $i++){
echo "<tr>";
echo "<td>".mysql_result($getdetails,$i,"rank")."</td>";
echo "<td>";
echo"<a href=\"stats.php?id=".$userlinks[$i]."\">".mysql_result($getdetails,$i,"user")."</a></td>";
echo "<td>".mysql_result($getdetails,$i,"soldiers")."</td>";
echo "<td>".mysql_result($getdetails,$i,"side")."</td>";
echo "<td>".mysql_result($getdetails,$i,"gold")." gold</td>";
echo"</tr>";
}
echo "</table>";