Retrive data from session. |
I getting NULL Registration id from session.
But when i check Code: var_dump( $this->session->userdata['logged_in']);die; When i am getting registration id from session, its null Code: $registration_id = $this->session->userdata['logged_in']['registration_id']; Help me out Thanks.
Web Developer
That is very strange. Is there anything happening between the two var_dumps besides assigning value to $registration_id? Try something like this and see what happens.
PHP Code: $registration_id = $this->session->userdata['logged_in']['registration_id']; I'm stumped if you still get NULL. If you don't get NULL, it probably means you are accidentally modifying the session data somewhere before assigning the value to $registration_id.
Hey, don't work without a PHP debugger. Several free IDEs have this features built in. Two are NetBeans and CodeLobster. Without a debugger, it's like you're driving with a blindfold on -- you are going to crash!
(03-11-2015, 06:07 AM)RobertSF Wrote: That is very strange. Is there anything happening between the two var_dumps besides assigning value to $registration_id? Try something like this and see what happens. I got my error Here: Result: array (size=3) 'registration_id ' => string '1' (length=1) 'email' => string '[email protected]' (length=20) 'name' => string 'Ahmed' (length=12) 1st line after registration_id and before single inverted comma containing a wide space. AND i am using netbeans. Thanks.
Web Developer
Glad you found it! I didn't notice that at first either.
Hey, don't work without a PHP debugger. Several free IDEs have this features built in. Two are NetBeans and CodeLobster. Without a debugger, it's like you're driving with a blindfold on -- you are going to crash!
|
Welcome Guest, Not a member yet? Register Sign In |