Changing my URL (address) with PHP ....?

Real simple question I am sure.

I am using a $_GET function to load mysql data onto a page.

The url that Calls the information reads something like this ::: http://examplesite.com/?dbvariable=bill

Everything on the page loads up fine; MY question is, how would I code my script so that http://examplesite.com/bill - does the same things that the previous url does (load all information in my database, connected to ‘bill’ — which of course would change dynamically, if instead of ‘bill’ it were to read ‘john’ - now it will pull all johns’ info.

I am sure this might have been covered before; I just don’t quite know what ‘term’ to use to properly find my answer; I know it’s do-able!

Thanks in advance to anyone who understands this question; and can provide any solutions… or at least, point me in the right direction.

p.s. please do not lick those links… just examples.

You’ll need to look in to mod_rewrite and .htaccess to do things like this. It can’t be done without as the server will expect a default file to be in the folder /name

.htaccess, unlike global.asa in asp, gets called before any files do. So you can use that with mod_rewrite to send data as though it was coming from a default file

that makes sense; I might look into that then instead …

i was also wondering if there is a way to Shorten /?dbvariable= … to something like /?u=

where the string ?u is = to ?dvariable

for something like that, am I looking at using String Replace??

is that even possible? - because if I can shorten the link, that would be better, than changing how the site reads for files/folders I am thinking; thanks again for any help or points provided.

kingc,

Mark was correct. You might benefit from reading the mod_rewrite tutorial linked in my signature as it contains explanations and sample code. It’s helped may members and should help you, too.

Regards,

DK