Jump to content

Form Coding help needed


epm1013

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

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  :D

Link to comment
Share on other sites

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  :D

Yes, that is correct - But based on the question asked, do you really think that is a possibility in this case?

Link to comment
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.