By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,781 Members | 1,427 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,781 IT Pros & Developers. It's quick & easy.

Method POST not allowed error when submitting a form.

P: 5
this is my html /php form but every time i click submit it says
the metod post is not alowed how can i fix this
Expand|Select|Wrap|Line Numbers
  1.  <!-- Form made by cody.m -->
  2. <center>
  3.  <FORM METHOD="POST" ACTION="test.php">
  4.  <font color="red">*</font>First Name: <INPUT TYPE="text" VALUE="Joe king" SIZE="20" onFocus="this.value=''">
  5.  
  6.  <font color="red">*</font>E-Mail: <INPUT TYPE="text" VALUE="removed email address" SIZE="30" onFocus="this.value=''">
  7.  
  8.  </p>
  9.  <center>
  10. <pre>Comments or feedback:</pre><TEXTAREA NAME="comment" ROWS=10 COLS=50></TEXTAREA>
  11.  <BR>
  12.  </center>
  13.  <INPUT TYPE="submit">
  14.  <INPUT TYPE="reset">
  15.  
  16.  </form>
  17.  
  18.  </center>
  19. <!-- END OF "Form made by cody.m" -->
Dec 31 '08 #1
Share this Question
Share on Google+
4 Replies


P: 15
What says the method 'post' is not allowed? Is your web browser saying this? Or is PHP saying this? I'm guessing it's your web browser. If so, what browser are you using? Internet Explorer? Firefox? Safari? Have you tried it in a different browser?

Your code is very old fashioned (that's the way web pages were written 5 years ago), but it should work.

Apart from you need:
name="give_me_a_name"
on each of your <input tags. Otherwise you wont be able to use php to get the values that the user enters. (You'll need $_POST['name_you_gave_it'] to get the value.)

Also, I'd recommend getting rid of
onFocus="this.value=''"
That will probably piss people off when they try to use it.
Jan 1 '09 #2

Markus
Expert 5K+
P: 6,050
codyshea2000,

When posting code in the forums, it is required that you wrap the code in [code] tags. You can do this by simply highlighting the code and then hitting the '#' button at the top of our editor (where you write your post). Doing this formats your code and, in return, helps our experts read it and give an answer.

If you have any doubts, you can have a look over our Posting Guidelines to get familiar with the rules.

Thanks,
Moderator.
Jan 1 '09 #3

Atli
Expert 5K+
P: 5,058
codyshea2000,

I have changed the title of this thread to better describe it's contents.
Using phrases like "help me please!" as a thread title is not allowed.
(See Use a good thread title for more info on how to make a good title).

When posting in these forums, you are required to follow the Posting Guidelines.
This is NOT optional, and failure to do so will eventually lead to a ban on your account.

Make sure to you follow them when posting here in the future.

Moderator
Jan 1 '09 #4

P: 15
Codyshea, you sent me a personal message or something? I can't find it now, but you said you were using Firefox.

I've tried your code and it seems to work. Although there seems to be a stray </p> tag on line 8. It's not effecting anything, but you should take it out.

Are you sure there isn't something somewhere else in your page that's causing the problem?
Jan 3 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.