squiblo Posted November 1, 2009 Share Posted November 1, 2009 i have never had this problem before and i am confused to why this is happening...for example this code... <?php if ($_SESSION['myusername']) echo "logout"; ?> will come up with an error message saying... Notice: Undefined index: myusername in /customers/......on line 55 the error message only somes up when the session has been set... if any other information is needed to solve this problem, please tell me. Quote Link to comment https://forums.phpfreaks.com/topic/179778-solved-session-trouble/ Share on other sites More sharing options...
Alex Posted November 1, 2009 Share Posted November 1, 2009 Use isset(). if(isset($_SESSION['myusername'])) echo "logout"; Quote Link to comment https://forums.phpfreaks.com/topic/179778-solved-session-trouble/#findComment-948506 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.