- Joined
- Mar 26, 2006
- Messages
- 603
- Reaction score
- 7
Heres the script
My problem comes in when multiple users are displayed because $user becomes the last user displayed (of course) but i cant figure out a way where when i click the link the username clicked can be set to $user. Sorry if this is confusing
PHP:
$users = mysql_query("SELECT username FROM userinfo WHERE status=1") or die(mysql_error());
echo("Click the user to add them to your friends list");
echo("<br />");
while($row = mysql_fetch_array($users))
{
$user = $row["username"];
echo "<a href='?act=addfriend=$user'>".$row["username"].'</a><br>';
}