zgkhoo Posted August 11, 2007 Share Posted August 11, 2007 logout.php <?php unset($_SESSION['username']); session_destroy(); ?> error msg:Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in C:\xampp\htdocs\logout.php on line 3 anyone know where goes wrong? thanks. Quote Link to comment https://forums.phpfreaks.com/topic/64374-solved-logout-session-problem/ Share on other sites More sharing options...
phpknight Posted August 11, 2007 Share Posted August 11, 2007 Yes, you cannot detroy a session you have not started. Put session_start() first. Otherwise, the script cannot see the active session. Quote Link to comment https://forums.phpfreaks.com/topic/64374-solved-logout-session-problem/#findComment-320992 Share on other sites More sharing options...
zgkhoo Posted August 11, 2007 Author Share Posted August 11, 2007 yup, it help, thanks you very much. Quote Link to comment https://forums.phpfreaks.com/topic/64374-solved-logout-session-problem/#findComment-321004 Share on other sites More sharing options...
MadTechie Posted August 11, 2007 Share Posted August 11, 2007 please click solved Quote Link to comment https://forums.phpfreaks.com/topic/64374-solved-logout-session-problem/#findComment-321007 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.