Re: HTTP_POST_VARS['var'] displayed but not $var

From: Date: Mon, 05 Aug 2002 19:11:22 +0000
Subject: Re: HTTP_POST_VARS['var'] displayed but not $var
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-111246@lists.php.net to get a copy of this message
> From: "Lee P. Reilly" <lreilly@lanl.gov> > Sent: Monday, August 05, 2002 3:03 PM > Subject: [PHP] HTTP_POST_VARS['var'] displayed but not $var > > I recently installed the php-4.2.2-Win32 cgi and have come across a > problem. When I have form variables, I can only read them via > $HTTP_POST_VARS['var'] and *not* simply via $var. > > i.e. > echo $HTTP_POST_VARS['Qmin']; // works a charm > echo "<br><br>$Qmin"; // doesn't work > > Does anyone know what the problem is? PHP 4 out of the box has register_globals off now. You should now use $_POST['var'] instead --or-- you could turn register_globals back on. You can read about why register_globals is now default off under Security at: http://www.php.net/release_4_1_0.php

« previous php.general (#111246) next »