Cesar Aracena
asked on
Clean URL from GET variables
Hi guys,
I'm building a site without Smarty or any other framework so I'm making my own script to validate data, users selections, etc. An example would be when the user changes the language: check against the DB if the GET parameter contains a valid language and cookie him. That and more is being done in a file required before every page but once the visitor clicks on mysite.com/samepage/?lang= en I want the page to reload (for which I'm using $_SERVER['REQUEST_URI']), work on the DB and cookie stuff and send him to the same page but with a clean URL (i.e. mysite.com/samepage/).
What's the best method? regex?
Thanks in advance!
I'm building a site without Smarty or any other framework so I'm making my own script to validate data, users selections, etc. An example would be when the user changes the language: check against the DB if the GET parameter contains a valid language and cookie him. That and more is being done in a file required before every page but once the visitor clicks on mysite.com/samepage/?lang=
What's the best method? regex?
Thanks in advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window
I would love to hear comments and specially it it's safe.