# Its me with more problems with PHP

**URL:** <https://forum.kirupa.com/t/its-me-with-more-problems-with-php/197479>\
**Category:** Uncategorized\
**Created:** [August 16, 2006, 7:21pm UTC](https://forum.kirupa.com/t/its-me-with-more-problems-with-php/197479 "2006-08-16T19:21:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Decfor](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Decfor](https://forum.kirupa.com/u/Decfor)\
**Post date:** [August 16, 2006, 7:21pm UTC](https://forum.kirupa.com/t/its-me-with-more-problems-with-php/197479/1 "2006-08-16T19:21:17Z")

</div>

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=](http://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

```php

$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>";

```
