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 Link to comment https://forums.phpfreaks.com/topic/93898-form-coding-help-needed/ 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. Link to comment https://forums.phpfreaks.com/topic/93898-form-coding-help-needed/#findComment-481141 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 Link to comment https://forums.phpfreaks.com/topic/93898-form-coding-help-needed/#findComment-481149 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 Link to comment https://forums.phpfreaks.com/topic/93898-form-coding-help-needed/#findComment-481169 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 Link to comment https://forums.phpfreaks.com/topic/93898-form-coding-help-needed/#findComment-481187 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? Link to comment https://forums.phpfreaks.com/topic/93898-form-coding-help-needed/#findComment-481201 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 Link to comment https://forums.phpfreaks.com/topic/93898-form-coding-help-needed/#findComment-481250 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.