Maybe my understanding of this is wrong, but has anyone seen a server setup where ‘register globals’ is set to off, but the Superglobal arrays $_GET[] and $_POST[] return no data from HTML form inputs? In fact, the only way to retrieve posted form data is to use the global post variable name (as you would, ironically, if ‘register globals’ was on). I.e., $_POST[‘name’]; is emtpy, however $name would have the data in it. Seems totally backwards to me, but maybe I’m the one who’s backwards?
@bokehAug 08.2005 — #Register globals 'off' means you must use $_POST $_GET $_REQUEST etc while register globals 'on' can also access data directly using variable name. For example 'off' use only $_POST['name'], or when set to 'on' use $name.
@grailquester5authorAug 08.2005 — #Yes - but the issue is that $_POST[] is always empty, regardless of register globals status. The PHP version is (supposedly) 4.2.0., so my understanding is that $_POST[], $_GET[], $_REQUEST[], etc., should always be available. However, they are always empty. Maybe I'll try $HTTP_POST_VARS[] and see if that works. Any idea if there is a server setting which disables $_GET[] and $_POST[]?
@grailquester5authorAug 08.2005 — #Ah-ha! Although the hosting company says "PHP 4.3" with register globals OFF, the actual truth (shown via phpinfo()? is that the version is 4.0 with register globals ON. Which would mean that $_GET[] and $_POST[] don't exist and I need to use $HTTP_POST_VARS[] instead. Nothing like a server admin who doesn't know what they're doing!