分页器不存储搜索参数
我在搜索脚本中使用 jpinedo.webcindario.com/scripts/paginator,但是当我单击第 2 页时,第一次搜索的参数丢失了(我收到自己的消息“您需要输入至少 2 个字符”) “)
我怎样才能让它发挥作用? 这是我的 search.php:
$q = mysql_real_escape_string($_POST['q']);
$option = mysql_real_escape_string($_POST['option']);
来自我的 index.php,搜索模块 (其余部分与脚本示例相同,简单搜索)
我尝试过:
$_pagi_propagar = array("q","option","search");
i'm using jpinedo.webcindario.com/scripts/paginator at my search script, but when i click on the page 2 the parameters from the first search are lost (i get my own message for "you need to type at least 2 characters")
how can i make it work?
this is my search.php:
$q = mysql_real_escape_string($_POST['q']);
$option = mysql_real_escape_string($_POST['option']);
that are coming from my index.php, search module
(the rest are just the same from the script example, a simple search)
i tried:
$_pagi_propagar = array("q","option","search");
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您希望搜索基于 GET 而不是基于 POST。这是因为单击链接始终基于 GET,因此将搜索提交更改为 GET 比将链接更改为 POST 更容易,因为这需要相当多的 JavaScript。
You want to make your search GET based instead of POST based. This is because clicking a link is always GET based, so it's easier to change the search submit to GET than change the links to POST, since that requires a fair bit of javascript.