Log in

View Full Version : Resolved Online users-link to profile?



liamallan
03-03-2010, 06:47 PM
i have recently been working on a login/registration script, and have inserted an option to view currently online users. each online user is inserted into a table which works fine:


<table width="200" border="1" cellspacing="0" cellpadding="3">
<tr>
<td align="center"><strong><u>Online Users</u></strong></td>

</tr>
<?php
while($rows=mysql_fetch_array($query)){
?>
<tr>
<td><? echo $rows['username']; ?>
<div align="center"></div></td>
</tr>
<?php
}
?>
</table>
i want to try and make every different username linked to the profile page of the corresponding username. the profile page url will be like http://www.shiftysplayground.co.cc/userinfo.php?user='username'.

just wondering if anyone can help me on this? thanx in advance!

traq
03-03-2010, 08:53 PM
<td>
<?php
echo '<a href="http://www.shiftysplayground.co.cc/userinfo.php?user='.$rows['username'].'">'.$rows['username'].'</a>';
?>
</td>

assuming $rows['username'] is the value you use to id the profile page, of course.

liamallan
03-04-2010, 02:07 AM
thanx mate, that is spot on! works like a dream, thanx again