admanage - performance enhanced search technology

How can I make a <a href link for data output by php and mysql?

He has: 107 posts

Joined: Mar 2006

Hi,

I have two questions here, so would appreciate some help from anyone who is good at using PHP! Wink

I have the code below on the browse users page and I'm not sure of the syntax to use to get the userid to be a link so the user can click on it to go to that users profile:

$query = "SELECT * FROM plus_signup";

$result = mysql_query($query) or die(mysql_error());

while($row = mysql_fetch_array($result)){
echo "a href=. view_profile.php? =$row['userid']. ">$row->userid ". $row['name'];
echo "";

Sponsor

He has: 470 posts

Joined: Sep 2006

Something like this would work:

<?php
while($row = mysql_fetch_array($result))
{
echo
'<a href="view_profile.php?' . $row['userid'] . '">' . $row['name'] . '</a>';
}
?>

He has: 107 posts

Joined: Mar 2006

Thanks!