$_GET and isset()

loco

New Member
I am getting tried of \[code\]if isset($_GET['whatever'])...\[/code\] before the rest of my if statement. E_NOTICE errors are way to handy to turn off and for \[code\]$_POST\[/code\] variables I have a solution in my init script..\[code\]$POST = (is_array( $_POST ) && count( $_POST ) > 0);\[/code\]I find this helps self posting scripts look clean.\[code\]if ($POST) { // now do something with $_POST...}\[/code\]I'm not sure how to dynamically do this if you have no idea what the key is? Can anyone help find a similar solution for \[code\]$_GET\[/code\] variables?EDIT:I simply want \[code\]if ($_GET['whatever'] == "whatever");\[/code\] to return false if it's not set and no \[code\]E_NOTICE\[/code\] errors.EDIT:Sorry if I'm unclear I'm looking for a solution for \[code\]$_GET\[/code\] not \[code\]$_POST\[/code\]--I only am using \[code\]$_POST\[/code\] as an example of what I hope to achieve.
 
Back
Top