Link to home
Start Free TrialLog in
Avatar of Tony Pearce
Tony PearceFlag for United Kingdom of Great Britain and Northern Ireland

asked on

PHP Sanitize GET

Hi,
I would like a block of PHP in the header of a page that recieves the input via a GET url string, I want to stop any encoded rubbish and forward to a page where I can give instructions.

Thanks
Avatar of PranjalShah
PranjalShah
Flag of United States of America image

I think you want to redirect to a particular page if you receive an input via url, you can do

if($_GET['urlvariable']){
        header ('Location: ' . "http://mysite.com");
}
Avatar of Tony Pearce

ASKER

Kind of, what i need to do is redirect if any bad chars are detected
ASKER CERTIFIED SOLUTION
Avatar of PranjalShah
PranjalShah
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial