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