btr2007 Posted December 17, 2007 Share Posted December 17, 2007 I am having a problem with my logout. Can someone have a look and tell me what is wrong with the following <?php setcookie('user', $client, time()-(60*60),'/','http://mysite'); // Setting The Cookie setcookie('pass', $pass, time()-(60*60),'/','http://mysite'); // Setting The Cookie header("Location: http://mysite/index.php"); // Redirect To index.php ?> Quote Link to comment Share on other sites More sharing options...
revraz Posted December 17, 2007 Share Posted December 17, 2007 Are you saying the cookie isnt getting deleted? May want to do something like: setcookie ('user','',time() -60*60*24*365,'/'); Quote Link to comment Share on other sites More sharing options...
btr2007 Posted December 17, 2007 Author Share Posted December 17, 2007 We have just worked out that the logout button works if you are at http://oursite.com but doesnt work when you are at http://www.oursite.com I just tried this code: setcookie('user', $client, time()-(60*60*24*7),'/','.oursite.com'); setcookie('pass', $pass, time()-(60*60*24*7),'/','.oursite.com'); But this doesnt appear to have changed anything. Quote Link to comment Share on other sites More sharing options...
revraz Posted December 18, 2007 Share Posted December 18, 2007 Try it as I entered it. Quote Link to comment 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.