note 82160 added to tutorial.forms
| From: | arnel_milan at hotmail dot com | Date: | Sat, 29 Mar 2008 17:27:26 +0000 |
| Subject: | note 82160 added to tutorial.forms | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-137726@lists.php.net to get a copy of this message | ||
I was so shocked that some servers have a problem regarding the Submit Type Name and gives a
"Not Acceptable error" or Error 406.
Consider the example below :
<form action="blah.php" method="POST">
<table>
<tr>
<td>Name:</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="Submit_btn" id="Submit_btn"
value="Send">
</td>
</tr>
</table>
</form>
This very simple code triggers the "Not Acceptable Error" on
PHP Version 5.2.5 and Apache 1.3.41 (Unix) Server.
However to fix this below is the right code:
<form action="blah.php" method="POST">
<table>
<tr>
<td>Name:</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="Submitbtn" id="Submit_btn"
value="Send">
</td>
</tr>
</table>
</form>
The only problem that took me hours to find out is the "_" in the Submit Button.
Hope this help!
----
Server IP: 69.147.83.197
Probable Submitter: 203.177.57.170
----
Manual Page -- http://www.php.net/manual/en/tutorial.forms.php
Edit -- https://master.php.net/note/edit/82160
Del: integrated -- https://master.php.net/note/delete/82160/integrated
Del: useless -- https://master.php.net/note/delete/82160/useless
Del: bad code -- https://master.php.net/note/delete/82160/bad+code
Del: spam -- https://master.php.net/note/delete/82160/spam
Del: non-english -- https://master.php.net/note/delete/82160/non-english
Del: in docs -- https://master.php.net/note/delete/82160/in+docs
Del: other reasons-- https://master.php.net/note/delete/82160
Reject -- https://master.php.net/note/reject/82160
Search -- https://master.php.net/manage/user-notes.php