Re: bad programming?
| From: | Kim Steinhaug | Date: | Wed, 23 Jun 2004 16:29:44 +0000 |
| Subject: | Re: bad programming? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-188893@lists.php.net to get a copy of this message | ||
Could be something about the server environment,
you could try changing to :
$_SERVER["REQUEST_METHOD"]
Run a phpinfo() and see what variables are active on your new
server. I know that IIS webservers lack alot of the variables we
take for granted mostly.
--
--
Kim Steinhaug
----------------------------------------------------------------------
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
----------------------------------------------------------------------
www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
----------------------------------------------------------------------
"Amanda Hemmerich" <amccomb@indiana.edu> wrote in message
news:Pine.GSO.3.96.1040623110805.17382B-100000@kate.ucs.indiana.edu...
> We just moved a bunch of code from one web hosting company to another.
> Now, one of the pages no longer works. I have been sort of starting from
> scratch, and the first line is still not working. Am I using something
> that I shouldn't be? Here is a code snippet:
>
> if ($REQUEST_METHOD=='POST') {
> for(reset($HTTP_POST_VARS);
> $key=key($HTTP_POST_VARS);
> next($HTTP_POST_VARS)) {
> $this = addslashes($HTTP_POST_VARS[$key]);
> $this = strtr($this, ">", " ");
> $this = strtr($this, "<", " ");
> $this = strtr($this, "|", " ");
> $$key = $this;
> }
> }
>
> The part that's not working is the $REQUEST_METHOD=='POST' line. If I
> replace that with if ($login) (and $login is the name of the submit button
> on the form), it works fine. I am leary of using $login...any other
> suggestions?
>
> Thanks.