Jump to content

profile.php?$username=blah Help Please


Dracolas

Recommended Posts

Ok i'm really new to php. I've Seen it where sites have profile pages for their members and i've seen it like

www.yoursite.com/profile.php?$username=blah

I would like to know how to make that work... in other words how do i make profile.php recognize that the $username in the url is the username to use for the page.

Any assistance is appreciated.

Link to comment
https://forums.phpfreaks.com/topic/185259-profilephpusernameblah-help-please/
Share on other sites

Well you could either do:

 

Then retrieve it using:

$username = $_GET['username'];

OR

 

And access it using:

 

$username = $_SERVER['QUERY_STRING']; // Bear in mind that if any other variables are in this it will return the whole string eg. USERNAME&id=2

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.