简体   繁体   English

如何使用POST操作在分页表中显示数据?

[英]How to display data in paging table with POST actions?

I am trying to find the best method for displaying data in a paging table that uses POST to retrieve appropriate data. 我正在尝试找到在使用POST检索适当数据的分页表中显示数据的最佳方法。 The problem is when the POST value Inactive executes and then I navigate to the second page of the data displays the Active data instead. 问题是当执行POST值Inactive ,然后我导航到数据的第二页时显示Active数据。 I believe this is cause by the default data being Active and the code is not tracking the previous search. 我认为这是由于默认数据处于Active ,并且代码未跟踪先前的搜索所致。 I can't seem to find the correct method to solve this. 我似乎找不到解决此问题的正确方法。 Do I have to use some AJAX or jQuery to track the previous POST value? 我是否必须使用一些AJAX或jQuery来跟踪先前的POST值?

Thanks 谢谢

$config['suffix'] = '?'.http_build_query($_GET, '', "&");

I changed my POST to GET then I add the line above and I worked perfectly. 我将POST更改为GET然后在上面添加了一行,然后我运行良好。

Reference: codeigniter pagination url with get parameters 参考: 带有get参数的codeigniter分页网址

Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM