Re: Problem with $PHP_SELF on PWS
| From: | Matt | Date: | Sun, 11 Aug 2002 14:47:01 +0000 |
| Subject: | Re: Problem with $PHP_SELF on PWS | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-112029@lists.php.net to get a copy of this message | ||
>From: "John Brooks" <mysticarts@madasafish.com>
>Sent: Sunday, August 11, 2002 10:21 AM
>Subject: [PHP] Problem with $PHP_SELF on PWS
> I have PHP installed on PWS running on a Windows 98SE m/c.
> When I invoke <form action="action.php" method="POST"> everything is
> fine
and the form data is > extracted correctly.
> When I try to embed the same script in the body of the form using
> <form action="<?php $PHP_SELF; ?>" method="POST"> I get
> "HTTP Error 405
Method not allowed.
If you view source from the browser you'll see the action is empty.
Use:
<form action="<?php echo $_SERVER['PHP_SELF']; ?>"
method="POST">