Jump to content

URL Variables


Isityou

Recommended Posts

You use the loop, check if the variables shouldn't be there, then fail/exit/report if they do. Pretty straight forward

 

$varsyouwant = array('var1', 'var2', 'var3');

foreach ($_GET as $var => $val)

  if (!in_array($var, $varsyouwant) )

  echo 'GET variable "' . $var . '" should not be there.';

 

Link to comment
https://forums.phpfreaks.com/topic/94445-url-variables/#findComment-483955
Share on other sites

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.