I'd like your opinions as to why I don't use something like this...
A function that iterates through $_GET, $_POST, $_COOKIES and
$_SESSION arrays and turn them back into conventional variables. I
already have chunks of code at the top of some pages, particularly
large forms that look something like this...
$id = isset ($_GET['id']) ? $_GET['id'] : "";
....one line after another pulling the variable back from the array and
back into a more manageable variable name.
I know this could be done with a foreach loop and using eval
statements so why don't I. Is this being lazy? Or are there security
holes or other issues?
If you processed them in the order of GET, POST, COOKIES, SESSION then
you'd overwrite any hacked attempts to use GET in preference to a
cookie but I'm just struggling to see the sense in not doing it.
Opinions please.
Paul