使用 html 表单提交到远程 .cfm 文件

发布于 2024-12-10 20:07:33 字数 506 浏览 0 评论 0原文

我希望我的网站访问者能够搜索由一家名为 Priority Pass 的公司提供的机场休息室。我创建了以下表单:

<form action="http://prioritypass.com/lounges/lounge-print.cfm" method="post">
  <input type="text" id="print_airport_code" name="print_airport_code" value="MAN" />
  <input type="submit" value="Submit" />
</form>

这反映了他们在自己的移动搜索网站上的表单(此处 )。但是当我提交表单时,参数似乎没有正确发布。

任何帮助都会很棒。谢谢。

他们网站上的表格似乎不包含我错过的任何字段?

I want visitors to my website to be able to search for airport lounges offered by a company called Priority Pass. I have created the following form:

<form action="http://prioritypass.com/lounges/lounge-print.cfm" method="post">
  <input type="text" id="print_airport_code" name="print_airport_code" value="MAN" />
  <input type="submit" value="Submit" />
</form>

Which mirrors the form they have on their own mobile search site (here). But when I submit my form it doesnt seem like the parameters are being posted properly.

Any help would be great. Thanks.

The form on their website doesnt appear to contain any fields which I have missed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

堇年纸鸢 2024-12-17 20:07:33

您指向了错误的 URL; POST 到 /lounges/lounge-print.cfm 会生成 HTTP 重定向标头,这会破坏您的输出。

此外,您的输入字段名称不正确。使用其他人的表单结果通常需要您保持所有字段名称与远程站点上显示的一致。

将表格更改为:

<form action="http://www.prioritypass.com/mobile/lounges.cfm" method="post">      
    <input id="Airport_Code" name="Airport_Code" type="text" size="10" value="MAN" />
    <input type="submit" value="Submit" />
</form>

You're pointing to the wrong URL; POSTing to /lounges/lounge-print.cfm is producing an HTTP redirect header, which is corrupting your output.

Additionally, the name of your input field is incorrect. Using someone else's form results often requires you to maintain all field names consistently as they appear on the remote site.

Change the form to:

<form action="http://www.prioritypass.com/mobile/lounges.cfm" method="post">      
    <input id="Airport_Code" name="Airport_Code" type="text" size="10" value="MAN" />
    <input type="submit" value="Submit" />
</form>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文