Seattle PHP User Group Message Board › Invalid Parameters URL

Invalid Parameters URL

Seattle, WA
Post #: 4
Hi all -

How do you validate the url parameters that if a user changes your query of your url, the user will be redirect to your error webpage.

For example if your webpage is

A user change the url to at the top of the address bar to­k

Want it to go to an error webpage

Could I get suggestions on how to go about this? I looked up functions like

I tried it out but don't fully understand it. Am I on the right path or are there other suggestions?


Mark S.
Seattle, WA
Post #: 17
Hi Leigh,

You'll probably get more response on the mailing, but it depends on your code, an easy way would be to write a function that checks to see if the parameters i correct and add it to the top of your


// some magic function that checks paramters based on your requirements
$paramterIsValid = checkParameters( $_GET );

if( !$paramterIsValid ) {
header( "location: people.php" );

<start of html document>
Powered by mvnForum

Our Sponsors

  • TUNE

    Meeting space and food

  • PluralSight

    PluralSight subscriptions for developer training

  • Siteground

    Information coming Soon

  • O'Reilly

    Disc Code: PCBW is good for 40% off print and 50% off ebooks and videos

  • JetBrains PhpStorm

    Occasional free licenses to raffle off at meetups

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy