apache - POST 请求在表单中不起作用

标签 apache http post web get

我正在尝试使用 POST 方法提交一些表单。这是部分形式:

<form action="interlopers.php" mehod="post"  id = "interlopersForm" name="interlopersForm" onsubmit="return validateInterlopersForm()">
                <table border="0"> 
                    <tr> 
                         <td> <label for="ast_num" > Ast. num </label> </td>
                         <td> <input type="text" name="ast_num" id = "ast_num"
                                     value="<?php if(isset($_REQUEST['ast_num'])) { echo htmlentities ($_REQUEST['ast_num']); } ?>"
                                                  size="6"> </td>
                     </tr>
                     <tr> 
                      <td><label for="cut_off"> Cut-off </label></td>
                      <td><input type="text" name="cut_off"  id="cut_off" size="6" ></td>
                     </tr>
                     <tr> 
                      <td><label for="data"> Data </label></td>
                      <td><input type ="checkbox" name="data" id = "dataSDSS" value="SDSS" checked> SDSS <br>
                       <input type ="checkbox" name="data" id="dataWISE" value="WISE" checked > WISE <br>
                       <input type ="checkbox" name="data" id = "dataSp" value="Sp" checked> Taxonomy</td>
                     </tr>
                     <tr>
                      <td> <label for="isFinalStep"> Just interlopers? </label> </td>
                      <td> <input type = "checkbox" name="isFinalStep" id = "isFinalStep"> </td>
                     </tr>
                     <tr> <input type="hidden" name="submitted" value="1"> </tr>
                     <tr> 
                      <td colspan="2" align="center">     <input  type="submit" value="Calculate" > </td>
                     </tr>
                </table>
            </form>

但是,我收到的不是 POST 请求,而是 GET 请求。我在 Ubuntu 上使用 apache 服务器和 php5。我在本地服务器和远程主机上都试过了,但仍然是 GET 而不是 POST。

最佳答案

将 mehod="post"更改为 method="post"。

你写错了。

关于apache - POST 请求在表单中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25716248/

相关文章:

linux - 在 linux 命令行中使用 curl --data 上传 cURL http post 文件

python - Twilio SMS Python - 简单发送消息

javascript - Ajax 发布方法不起作用

apache - 在 ubuntu 上构建 mod_jk 时出现 "You must specify a valid --with-apxs path"

node.js - 从 Artifactory 安装 scoped npm 包

android - 为什么在HttpResponse response = client.execute(request)行之后进一步执行停止?

java - 通过 POST 将数据从 Java 发送到 PHP

c# - 团结 : Post Request unable to connect to destination host

javascript - 回发之前的表单标题

php - PHP Fun 的 Apache 500 错误