epm1013 Posted March 1, 2008 Share Posted March 1, 2008 I'm working with a book called "PHP Solutions" by David Powers. I created a form exactly the way the book describes along with the php to put into my MySQL database. However, I get "Method Not Allowed The requested method POST is not allowed for the URL /index.html." when I try a test in the form. Can someone suggest where I might have went wrong in my coding? My page is Blogger Institute Quote Link to comment Share on other sites More sharing options...
zq29 Posted March 1, 2008 Share Posted March 1, 2008 Have you used the correct file extension? HTML pages can't receive POST data as far as I'm aware. Quote Link to comment Share on other sites More sharing options...
epm1013 Posted March 1, 2008 Author Share Posted March 1, 2008 Hi SemiApocalyptic, Thank you for responding so quickly. I'm fairly new to programming so please fogive me here. When you say "file extention" are you meaning my home page Blogger Institute which is saved as a .html or my php file pages that I saved on my hosting? Eric Quote Link to comment Share on other sites More sharing options...
zq29 Posted March 1, 2008 Share Posted March 1, 2008 Well, it looks as though you have 'index.html' in the action attribute of your form. You can't post form data to a HTML form, you have to post it to a script ending with .php You'd definitely help us, help you, if you posted up some code Quote Link to comment Share on other sites More sharing options...
slpctrl Posted March 1, 2008 Share Posted March 1, 2008 Well, it looks as though you have 'index.html' in the action attribute of your form. You can't post form data to a HTML form, you have to post it to a script ending with .php You'd definitely help us, help you, if you posted up some code Not entirely true. You could write: AddHandler application/x-httpd-php .html to .htaccess and this will allow for html files to handle PHP. I know this isn't relevant here, but thought it should be noted Quote Link to comment Share on other sites More sharing options...
zq29 Posted March 1, 2008 Share Posted March 1, 2008 Well, it looks as though you have 'index.html' in the action attribute of your form. You can't post form data to a HTML form, you have to post it to a script ending with .php You'd definitely help us, help you, if you posted up some code Not entirely true. You could write: AddHandler application/x-httpd-php .html to .htaccess and this will allow for html files to handle PHP. I know this isn't relevant here, but thought it should be noted Yes, that is correct - But based on the question asked, do you really think that is a possibility in this case? Quote Link to comment Share on other sites More sharing options...
GameYin Posted March 2, 2008 Share Posted March 2, 2008 And the knowledge of the programmer. Hi SemiApocalyptic, Thank you for responding so quickly. I'm fairly new to programming so please fogive me here. When you say "file extention" are you meaning my home page Blogger Institute which is saved as a .html or my php file pages that I saved on my hosting? Eric Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.