Re: Variables don't pass... *sniff*

From: Date: Wed, 28 May 2003 11:46:50 +0000
Subject: Re: Variables don't pass... *sniff*
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-149230@lists.php.net to get a copy of this message
Leif K-Brooks wrote:
To maintain absolute compatibility, just use $HTTP_GET_VARS. It's availalable in all PHP versions, just deprectaed in versions here $_GET is available.
I would've thought that $HTTP_*_VARS will be deprecated sometime in the future. It might be an idea to write your own accessor methods, e.g. function RetrieveGetParameter($parameterValue) { if (FALSE == is_null($_GET)) {
     if (FALSE == empty($_GET[$parameterValue]))
     {
       return ($_GET[$parameterValue]);
     }
     else
     {
       return (NULL);
     }
} else {
     if (FALSE == empty($HTTP_GET_VARS[$parameterValue]))
     {
       return ($HTTP_GET_VARS[$parameterValue]);
     }
     else
     {
       return (NULL);
     }
} } -- David Grant Web Developer david.grant@wiredmedia.co.uk http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered Office: 43 Royal Park, Bristol, BS8 3AN Studio: Whittakers House, 32 - 34 Hotwell Road, Bristol, BS8 4UD Company registration number: 4016744 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************

« previous php.general (#149230) next »