Re: $PHP_SELF Problems
| From: | Niklas Brunlid | Date: | Wed, 09 Aug 2000 06:42:00 +0000 |
| Subject: | Re: $PHP_SELF Problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10854@lists.php.net to get a copy of this message | ||
Beau Hartshorne wrote:
>
> Hi,
>
> When I try to execute form code that looks like this:
>
> <FORM METHOD="post" ACTION="<?php echo $php_self ?>"> [...]
> </FORM>, I get
> this error in Netscape Navigator/Comunicator Mac/PC version 4.5:
>
> "Method Not Allowed
>
> The requested method POST is not allowed for the URL /wsm/index.html."
>
> It only delivers this message if the browser is NN. IE works fine. If I
> change the $php_self variable inside the form tag to the actual location of
> the php script, it seems to work, but other problems seem to arise and it
> seems like a bad way of doing things.
Two things I can think of:
1) $php_self should be $PHP_SELF since PHP variables are case-sensitive.
2) You're using $PHP_SELF in a function and have forgotten to declare it
as a global variable.
/Niklas