parse_url()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
NiGHTFiRE
Forum Contributor
Posts: 156
Joined: Sun May 14, 2006 10:36 am
Location: Sweden

parse_url()

Post by NiGHTFiRE »

Hey,
I'm making so every user gets their own profile, but i need help witha few things.
Right now i'm using $_GET to get the user's information from a mysql database. But now i need to get the users information from the url.
The profile is like this profile?=_username_

And i need to do something so i get the _username_ from the url.
I hope i've stated my question well, if not i'll try to explain myself better.

Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

$_SERVER['QUERY_STRING'] perhaps.
NiGHTFiRE
Forum Contributor
Posts: 156
Joined: Sun May 14, 2006 10:36 am
Location: Sweden

Post by NiGHTFiRE »

Thanks, Now it returns =_username_

And replace the _username_ to the persons username.
How would i take away the =?
I've tryed with str_replace
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

NiGHTFiRE
Forum Contributor
Posts: 156
Joined: Sun May 14, 2006 10:36 am
Location: Sweden

Post by NiGHTFiRE »

thanks.
works now.
Post Reply