Suppose you have a php page on your server called 'page1.php'.
If you were to visit http://yoursite.com/page1.php?username=cgmayhem, then you could type this code in page1.php to access the value of 'username' supplied in the url:
echo "the supplied username is " . $_GET['username'];
As far as which profile someone is looking for, you need to provide a list of links or perhaps a search box or something.
Your post is a little confusing so I'm not sure exactly what you want to do.