Hi,
to make things easy you can use the extract function to make all post and/or get variables globally available. The documentation has some useful comments on that.
http://de2.php.net/manual/de/function.extract.php
This will make you backwards compatible down to php 3.0.7
Here's one of the comments (by Steve):
destes (at) ix.netcom.com
13-May-2002 09:13
Extract provides an invaluable way to get around the possibility of the PHP directive register_globals being off or on. If you're used to register_globals being on, and you're worried that new PHP 4.2.0 implementations will mess up existing code (because it now defaults to off), try using this:
if (!empty($GET)) {
extract($GET);
} else if (!empty($HTTP_GET_VARS)) {
extract($HTTP_GET_VARS);
}
if (!empty($POST)) {
extract($POST);
} else if (!empty($HTTP_POST_VARS)) {
extract($HTTP_POST_VARS);
}
That's from PHPMyAdmin (to give proper credit), and the same thing would probably be useful elsewhere. Thanks,
Steve