![]() |
Parent Page Link Not Working Correct. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Parent Page Link Not Working Correct. (/showthread.php?tid=64568) |
Parent Page Link Not Working Correct. - wolfgang1983 - 03-05-2016 On my file manager I am trying to create a parent button link which will go back to previous page. How ever if i am in a sub folder and lets say on page 3 of pagination my parent button will only display the per page query like so Code: http://localhost/project-2-upload/index.php?c=filemanager&per_page=6 It should display like Code: http://localhost/project-2-upload/index.php?c=filemanager&image_directory=Hello&per_page=6 I can echo $this->input->get('image_directory') this fine and gets the correct query string. I am not sure what is wrong with code below any suggestions on improvment / examples and why it might not be working PHP Code: $parent_url = ''; RE: Parent Page Link Not Working Correct. - PaulD - 03-05-2016 Hi, 'strrpos' returns FALSE if your search term is not found, perhaps your directory name does not have a slash in it. Paul. PS Just out of curiosity, why do you do this? PHP Code: if (null !==($this->input->get('per_page'))) { And not just this... PHP Code: if ($this->input->get('per_page')) { RE: Parent Page Link Not Working Correct. - InsiteFX - 03-05-2016 If you just want to go back to the beginning with a parent button you can use something like this. PHP Code: $_SESSION['org_referer'] = $_SERVER['HTTP_REFERER']; I would convert it to CI. RE: Parent Page Link Not Working Correct. - wolfgang1983 - 03-05-2016 (03-05-2016, 03:45 PM)InsiteFX Wrote: If you just want to go back to the beginning with a parent button you can use something like this. I tried that not do what I am after. The code below now works fine with out adding the pagination query PHP Code: $parent_url = ''; But when I add the code below: It will block my image directory get query from work. PHP Code: if ($this->input->get('per_page')) { PHP Code: $parent_url = ''; |