![]() |
how to put dynamic info in an array? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: how to put dynamic info in an array? (/showthread.php?tid=26349) |
how to put dynamic info in an array? - El Forum - 01-11-2010 [eluser]dadamssg[/eluser] Im trying to put dynamic info in an array. Im setting a session variable to hold which page the user is on so if they login they will be redirected to the page they were on...this isn't working Code: $eventid = $row->eventid; how to put dynamic info in an array? - El Forum - 01-11-2010 [eluser]WebsiteDuck[/eluser] Take out the comma at the end of this line Code: 'page' => "event/index/$eventid", how to put dynamic info in an array? - El Forum - 01-11-2010 [eluser]dadamssg[/eluser] just tried it...still not working how to put dynamic info in an array? - El Forum - 01-11-2010 [eluser]WebsiteDuck[/eluser] Make sure $eventid contains data... make sure session library is loaded What happens when you try to retrieve the page from session? how to put dynamic info in an array? - El Forum - 01-11-2010 [eluser]saidai jagan[/eluser] Code: echo $eventid = $row->eventid; how to put dynamic info in an array? - El Forum - 01-11-2010 [eluser]dadamssg[/eluser] hmmm its returning the right content. It will hold "event/index/867". But i can't seem to to get it to work in a redirect. heres the redirect its being used in...in another controller Code: $page = $this->session->userdata('page'); how to put dynamic info in an array? - El Forum - 01-11-2010 [eluser]JHackamack[/eluser] try passing in a second param like: redirect($page, 'refresh'); or redirect($page, 'location'); how to put dynamic info in an array? - El Forum - 01-11-2010 [eluser]dadamssg[/eluser] nope, still nothing. im thinkin about using the normal PHP header() function how to put dynamic info in an array? - El Forum - 01-11-2010 [eluser]dadamssg[/eluser] welp, the header() won't work either...wtf. this is working, where mains is a controller and performance is a function Code: $newdata = array( Code: $page = "event/index/".$eventid; how to put dynamic info in an array? - El Forum - 01-11-2010 [eluser]JHackamack[/eluser] One other thing to check: Are you loading the URL helper? |