dtkvlj5386 2011-06-30 15:20
浏览 4
已采纳

too long

I have a form which looks like this:

<form action="" method="post">
...
</form>

When I click submit in it, I expect it to refresh the URL with the values submitted in the form. But it doesn't. The problem is that the submission depends on the url parameters.

Here is the problematic page:

http://www.comehike.com/hikes/search_hikes.php?all=yes&when=f&redirect=yes

If you search the top-left form it will not actually search what you asked because the URL isn't changing. It just searches the default values. Is there any way to remedy this? Where am I going wrong?

Thanks!

  • 写回答

2条回答 默认 最新

  • dongyun6229 2011-06-30 15:22
    关注

    The action contains a relative URI pointing to the current URI and the method says to post the data (so it wouldn't appear in the query string). So you are getting the expected behaviour.

    It sounds like what you want is actually:

    <form action="search_hikes.php" method="get">
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 路易威登官网 里边的参数逆向
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?
  • ¥50 需求一个up主付费课程