CammyD Posted March 3, 2008 Share Posted March 3, 2008 Hey all. It is me again, coming to you guys for help. I am, as i said before, making a members online side of a website. I am trying to get the logout working, and i need some help. There is a link i made, with the action session_destroy(); But to log out, i have to press it twice. Any ideas how i can fix this? Link to comment https://forums.phpfreaks.com/topic/94186-session_destroy-help/ Share on other sites More sharing options...
ohdang888 Posted March 4, 2008 Share Posted March 4, 2008 do you have session_start before the session destory? post some code. Link to comment https://forums.phpfreaks.com/topic/94186-session_destroy-help/#findComment-482452 Share on other sites More sharing options...
discomatt Posted March 4, 2008 Share Posted March 4, 2008 Have your logout script as follows unset($_SESSION) session_destroy(); header('Location: index.php'); Link to comment https://forums.phpfreaks.com/topic/94186-session_destroy-help/#findComment-482457 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.