Forum Moderators: coopster

Message Too Old, No Replies

Now that I know what to ask, here goes

What do I name my profiles page?

         

alwaysinit

12:52 am on Oct 4, 2006 (gmt 0)

10+ Year Member



I have a musician community portal site. I'm trying to create 'one' PHP page that is used for all musician's profiles.

Does anyone know what I should name this page to where it will function as everyone's profile page?(Can it be just "profiles.php"? Or do I need something more in the name to do that?

Thanks again for the help guys

eelixduppy

1:45 am on Oct 4, 2006 (gmt 0)



profiles.php is fine. You can name it whatever you want. And to get the user profiles, you can utilize the _GET variables [us2.php.net]. Something like this:

if(![url=http://us2.php.net/manual/en/function.isset.php]isset[/url]($_GET['user'])) {
echo 'Please specify a username';
[url=http://us2.php.net/manual/en/function.exit.php]exit[/url]();
}
$user = $_GET['user']
//connect to db server, select db
$query = "SELECT * FROM profiles WHERE username = '".[url=http://us2.php.net/manual/en/function.mysql-real-escape-string.php]mysql_real_escape_string[/url]($user)."'";
//etc...

This is, of course, assuming that you are using a database to store the user profiles.

Good luck!

alwaysinit

2:06 am on Oct 4, 2006 (gmt 0)

10+ Year Member



thanks, yes I am storing their info and file names of pics and mp3's in database. I am trying to get links in my site's search results to point to member profiles. Just unsure of how to make the universal profile page display a certain member's profile. And then have the same page display another members completely different profile.

I will try the code you gave me, thank you very, very, very much. Looks like what I want, now to see if I can code it right.