I have a results page on my site. There is a table that prints out all the results from my query. In the table I have a link set up on the "username" result field. What I want to do is set it up so that if someone clicks on the "username" link they will be brought to a new page with that person's full info. The link works and and I use this query
$result = mysql_query("select * from profile where username= '$username'") or die (mysql_error());
while ($row = mysql_fetch_array($result))
{
here is the table setup I am using-
print "<td><a href=http://mysite.com/infopage.php>".$result['username']."</a></td><td>".$result['sex'].
"</td><td>".$result['state']."</td><td>".$result['religion'].
"</td><td>".$result['age']."</td></tr>\n";
my problem is that I get a page result for all the "username" profiles. How do I just isolate the one profile that I click on. I tried using sessions and cookies( probably wrong) but that didn't work right either. Am I going about this the wrong way?
Any help is greatly appreciated.