how to create paging with form search, but query string enable?? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: how to create paging with form search, but query string enable?? (/showthread.php?tid=13581) |
how to create paging with form search, but query string enable?? - El Forum - 11-28-2008 [eluser]deepydee[/eluser] how to create paging with search, but query string enable??.. how to create paging with form search, but query string enable?? - El Forum - 11-28-2008 [eluser]JoostV[/eluser] I'm not sure what it is you're asking for, but anyway. By default query string (?foo=bar) is not enabled. This does not have to be a problem, though. Actually, your app is safer this way, so it's a good thing. Now to build a search module: 1. create a controller search/redirect, that creates a string that you can use to redirect to another controller, search/result. Your search form should post to search/redirect. Code sample for search/redirect: Code: if ($this->validation->search_string) { 3. You can use paging without having to store the search strings anywhere. You can always access the search strings because they are in your uri. As an added bonus: you search will become more user-friendly because users can now: 1. search by typing serach strings in the uri instead of posting 2. deeplink to serach results, or store them in favorites how to create paging with form search, but query string enable?? - El Forum - 12-01-2008 [eluser]deepydee[/eluser] thanks joosv before, but i still error, like this http://localhost/application/index.php?c=application/20 The URI you submitted has disallowed characters. why be?? how to create paging with form search, but query string enable?? - El Forum - 12-01-2008 [eluser]JoostV[/eluser] As I said, "By default query string (?foo=bar) is not enabled." You need to use action post, not get how to create paging with form search, but query string enable?? - El Forum - 12-02-2008 [eluser]deepydee[/eluser] yes i use method post, but i still confuse to parsing that page coz my URI get in $indexx ??? , this sinopsis my script in controler Code: class Application extends controler { headers.php Code: <? this view registerold.php Code: <? reportregister.php Code: echo "<br><table border=1 align=center cellspacing=0 cellpadding=0>"; and this model Code: function &getSelectRegsiterOld;($konds = '',[b]$config = '0'[/b] ) how & what can i do? how to create paging with form search, but query string enable?? - El Forum - 12-02-2008 [eluser]hyperfire[/eluser] My guess would be for you to use this : http://localhost/application/index.php/application/20 Instead of: http://localhost/application/index.php?c=application/20 Then use something like this to get your variables from URI: $c = $this->uri->segment(2); // gets the 20 from application/20 Also, your pagination base_url var should look like this: $config['base_url'] = base_url() . 'application/'; Hope this help. how to create paging with form search, but query string enable?? - El Forum - 12-02-2008 [eluser]JoostV[/eluser] I'm not quite sure what you mean. If you use the default CI installation it will kill all get variables. If you still wish to use get vaiables, like ?c=application, it's in tghe user guide: http://ellislab.com/codeigniter/user-guide/general/urls.html I can't explain it better than it is done there, I'm afraid. |