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. 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"; Link to comment https://forums.phpfreaks.com/topic/179778-solved-session-trouble/#findComment-948506 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.