分页器不存储搜索参数

发布于 2024-08-15 15:40:29 字数 408 浏览 2 评论 0原文

我在搜索脚本中使用 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 技术交流群。

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

发布评论

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

评论(1

仙女山的月亮 2024-08-22 15:40:29

您希望搜索基于 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文