Re: Page works when Form Action is Get but not Post



Michael Brennan-White wrote:
I created a very simple form called TestForm.php .

<SNIP>

I first set the method for the form to GET and the page loaded again after the submit. When I changed the method back to POST, I received a Page Not Found error page. I created another page testform3.php to display the Form Values after submit. I changed the action on the form to testform3.php. I still received the same error page?


The only thing I can suggest is that in IIS, you must explicitly set what types of HTTP request verbs are allowed for each type of file extension. It sounds as if your IIS setup is denying POST requests for ..php files.


Go to the IIS manager for your server, select Properties, select the Home Directory tab, then click Configuration. Select and edit the entry for .php files, and either add POST as a verb, or select All Verbs.

Then restart ("iisreset" at the command line).


-- Oli .