I have some php, its a while loop that will output a link for each friendid
after each link is clicked i want the link to disappear, what i have looks right to me but its not working the way i want it too.

$result = mysql_query(" SELECT * FROM people WHERE vip=1 ORDER BY RAND() ") or die(mysql_error());
while($row = mysql_fetch_array( $result ))

{
if($i++ % 11 == 0)
{
echo "<br />\n" ;
}


echo "<a id=\"add$friendid\" href=\"http://mydomain.com/addme.php?f=" . $row['friendid'] . "&c=" . $activatecode . "&r=" . $r . "\" target=\"_blank\" onclick=\"request(this); $('#add$friendid').hide();\"><img src=\"" .$row['pic']. "\" width=\"60px\" height=\"60px\"></a>";

}