Re: $PHP_SELF Problems

From: Date: Wed, 09 Aug 2000 18:52:11 +0000
Subject: Re: $PHP_SELF Problems
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-1908@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. > Don't specify an ACTION. By default, if you want the same document to be used to parse the result, IE (and I assume NS, though you know what they say about assuming) passes the arguments back to the same document all by itself. Like so ... /* myform.php */ <FORM METHOD="POST"> ... </FORM> When a user clicks on the submit button, the browser sends the form data to myform.php, then fetches a new copy of myform.php. I'm going to have to find out if that's intended behavior. -- O.

« previous php.db (#1908) next »