Fourscore and ten years ago a friendly web designer made me a static html website(they were all the rage back then). I've added a feedback form (feedback.html) to it, which does this
-process-feedback.php being a script that looks at the input controls' values, puts them in an email, and sends it to me.
When I click the 'submit' button on feedback.html, I get an error:
405 method not allowed: The requested method POST is not allowed for the URL /process-feedback.php
The wise armchair web developers on ExpertSexchange and the like all blithely say "Delete the index.html from the root folder, and it will work". And they are quite right - it does, beautifully. But I DON'T WANT to delete index.html because it is pretty darn integral to the website.
Is there some kind of "third way" where I can get my post to work, without ripping the guts out of the nice linked-together html site, e.g. tell PHP to ignore index.html?
The web server is a 3rd party hosted one, running Apache. So I'm not allowed to reconfigure the server, but I am allowed to put config files and stuff within the folders of my website. Apparently there's something called .htaccess files - can they rescue me?
This is my first day of contact with PHP or Apache (& ideally my last) so I promise not to laugh at any suggestions. Oh and don't worry about potential knock-on effects to other php scripts, because I promise there aren't any.
Code:
<FORM NAME=FEEDBACK ACTION="process-feedback.php" METHOD=POST>
When I click the 'submit' button on feedback.html, I get an error:
405 method not allowed: The requested method POST is not allowed for the URL /process-feedback.php
The wise armchair web developers on ExpertSexchange and the like all blithely say "Delete the index.html from the root folder, and it will work". And they are quite right - it does, beautifully. But I DON'T WANT to delete index.html because it is pretty darn integral to the website.
Is there some kind of "third way" where I can get my post to work, without ripping the guts out of the nice linked-together html site, e.g. tell PHP to ignore index.html?
The web server is a 3rd party hosted one, running Apache. So I'm not allowed to reconfigure the server, but I am allowed to put config files and stuff within the folders of my website. Apparently there's something called .htaccess files - can they rescue me?
This is my first day of contact with PHP or Apache (& ideally my last) so I promise not to laugh at any suggestions. Oh and don't worry about potential knock-on effects to other php scripts, because I promise there aren't any.





Comment