Reply to comment
GET and POST variables using PHP, the lazy way
If you want to catch form variables in $<variable name> format instead of the $_GET['variable name'] or $_POST['variable name'] format, just call import_request_variables() at the start of your script and supply either a ‘p’ or a ‘g’ argument for post or get respectively. Kind of nice for those lazy programmer out there.
For example, if you had an “email” variable submitted from your form and wanted to use $email instead of using $_POST['email'] in the script that gets the submission, or lets say you inherited a script where somebody wrote their code using the lazy format, then import_request_variables will come in handy.
The function’s second, optional parameter also specifies a prefix for your variable. You could also set register_globals = on if you didn’t want to use the import_request_variables function.
