/ Published in: HTML
Expand |
Embed | Plain Text
foreach($_GET AS $key => $value) { ${$key} = $value; }
Comments
Subscribe to comments
You need to login to post a comment.
llbbl on 05/27/07
form get php textmate forms Processing
2 people have marked this snippet as a favorite
foreach($_GET AS $key => $value) { ${$key} = $value; }
Subscribe to comments
You need to login to post a comment.
keep in mind here that you are letting ANY variable that comes in as GET data to be set to whatever variable name that is defined by the USER. thereby overwriting anything with that name in the scope of this code. This code effectively implements register_globals... something that was deprecated for security concerns. This may be an extremely efficient, time saving technique, but it makes it very easy to defeat your system.... i would suggest removing this from any code you have in the wild.