CI Sessions are killing me. What am I doing wrong here? - 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: CI Sessions are killing me. What am I doing wrong here? (/showthread.php?tid=45712) |
CI Sessions are killing me. What am I doing wrong here? - El Forum - 10-02-2011 [eluser]Unknown[/eluser] As some of you know, I am still feeling my way around with CI. Considering that I can't do what I want with Pagination, I have to put the passing variables in a session. Here is my dilemma: I need to post $search_method, $search_keywords (this is an array of keywords), $search_type, $search_miles. Because of the results, I need the same variables to give me the correct results from the database so I need to pass the variables to a session. Don't I have to check to see if there is a session variable and if not, set it? But wouldn't the part where I take the variable from the post and put a variable cause an error since if i am on the next page in the pagination and not posting? Here is the last thing I tried: Code: $sess_search_method = $this->input->post('search_method', TRUE); I know I probably over did it up there, but I have tried just about everything in the last few hours. Wish I could just use regular PHPSessions, but I want to use the new framework as much as possible. |