asmith Posted January 23, 2008 Share Posted January 23, 2008 my forum folder is mydomain.com/forum i've tried to make it when the user click on the forum link , it logout him from the site so a user can't be logged in , in both forum and my site . i've put if (isset($_SESSION[mysite])) { session_destroy(); } at the first of the index.php file in forum foler . like : <?php if (isset($_SESSION[mysite])) { session_destroy(); } /********* ... <-- the indexphp continue its own code but when i click on the forum link , which is mydomain.com/forum it won't logout me from my site pages, what am i doing wrong ? Quote Link to comment https://forums.phpfreaks.com/topic/87347-solved-smf-forum-putting-my-session-problem/ Share on other sites More sharing options...
rajivgonsalves Posted January 23, 2008 Share Posted January 23, 2008 from where is $_SESSION['mysite'] coming from... also use session_unset() that would clear all data in the session.. Quote Link to comment https://forums.phpfreaks.com/topic/87347-solved-smf-forum-putting-my-session-problem/#findComment-446776 Share on other sites More sharing options...
asmith Posted January 23, 2008 Author Share Posted January 23, 2008 bah i forgot to put session_start(); :/ anyway isn't this way make any problem with the forum to work fine ? Quote Link to comment https://forums.phpfreaks.com/topic/87347-solved-smf-forum-putting-my-session-problem/#findComment-446803 Share on other sites More sharing options...
rajivgonsalves Posted January 23, 2008 Share Posted January 23, 2008 no there should not be any problem... Quote Link to comment https://forums.phpfreaks.com/topic/87347-solved-smf-forum-putting-my-session-problem/#findComment-446807 Share on other sites More sharing options...
asmith Posted January 23, 2008 Author Share Posted January 23, 2008 what happens if we call session_start 2 times in a script ? i mean one mine at the top of the file , then in the middle the SMF session_start . Quote Link to comment https://forums.phpfreaks.com/topic/87347-solved-smf-forum-putting-my-session-problem/#findComment-446819 Share on other sites More sharing options...
rajivgonsalves Posted January 23, 2008 Share Posted January 23, 2008 nothing would happen it will not have any affect.. Quote Link to comment https://forums.phpfreaks.com/topic/87347-solved-smf-forum-putting-my-session-problem/#findComment-446833 Share on other sites More sharing options...
asmith Posted January 23, 2008 Author Share Posted January 23, 2008 ok , got it. thanks again Quote Link to comment https://forums.phpfreaks.com/topic/87347-solved-smf-forum-putting-my-session-problem/#findComment-446835 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.