Sessions WTF - 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: Sessions WTF (/showthread.php?tid=2467) |
Sessions WTF - El Forum - 08-07-2007 [eluser]Phil Sturgeon[/eluser] Got a real odd one here. If im just being an idiot then make your jokes and get it over and done with, at least its fixed. Code: function report($videoID) For SOME reason its not setting the session... why? I get the message: Quote:This game has been reported. A moderator has been notified and action should be taken very soon. every damn time and it always reports it! Sessions WTF - El Forum - 08-07-2007 [eluser]chobo[/eluser] I would just check what this line returns and go from there. It seems your query(?) always returns true. Code: if($this->video_model->report($videoID)): Just a quick update, I noticed you have this line. Code: echo 'test:'.$this->session->set_userdata('reported_'.$videoID); I don't use codeigniters session library, but I think you need to use this to retrieve session data Code: echo 'test:'.$this->session->userdata('reported_'.$videoID); Sessions WTF - El Forum - 08-07-2007 [eluser]Phil Sturgeon[/eluser] As I said its obviously returning correctly as the message is: Quote:This game has been reported. A moderator has been notified and action should be taken very soon. which comes directly after the session setting. Problem seems to have gone away now thankfully, have no idea what was causing it. Have used sessions plenty of times but this was just a really really odd one! |