phpgal Posted March 1, 2007 Share Posted March 1, 2007 Hi, I use PHP session variable to pass information among pages. I have these random case where all session variable are lost in between. I have session_start() on beginning of each page and no redirect function is used. I am not able to find what could be the reason that variables are randomly lost in some cases. Any help or information would be appreciate. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/40728-session-variable-lost-among-php-pages-in-random-cases/ Share on other sites More sharing options...
steveclondon Posted March 1, 2007 Share Posted March 1, 2007 I think you are starting your session again. You need this if you haven't done so. ps you could just use an else statement. if (isset($_SESSION)) { session_id(); } if (!isset($_SESSION)) { session_start(); } Link to comment https://forums.phpfreaks.com/topic/40728-session-variable-lost-among-php-pages-in-random-cases/#findComment-197148 Share on other sites More sharing options...
phpgal Posted March 1, 2007 Author Share Posted March 1, 2007 Thanks for your quick reply but if I was starting session again than I should lose session variable everytime but I happens randomly. Let me explain the exact scenerio. I use this on registration form. For some user registration I get complete information but in bet I get blank forms because information is lost in between. Link to comment https://forums.phpfreaks.com/topic/40728-session-variable-lost-among-php-pages-in-random-cases/#findComment-197153 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.