> -----Original Message-----
> From: Sean Malloy [mailto:[EMAIL PROTECTED]]
> Sent: 19 December 2002 23:30
> 
> Firstly, something regarding accessing form/query string variables, on
> diffferent versions of PHP. Starts to become a nightmare, but 
> you also want
> to make sure you _aren't_ requiring register_globals to be on...
> 
> so what I do;
> 
> function Form($var = null)
> {
>     if (function_exists('version_compare')) // added in 4.1.0
>     {
>         return @$_POST[$var];
>     }
>     global $HTTP_POST_VARS;
>     return @$HTTP_POST_VARS[$var];
> }

This seems unnecessarily complex -- $HTTP_*_VARS did not go away when the new $_* 
superglobals were introduced, and are not likely to anytime soon, so the simple way to 
do this is just to continue referring to $HTTP_POST_VARS[$var].


Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to