tj71587 Posted October 15, 2007 Share Posted October 15, 2007 I just created a really simple login with cookies and used setcookie("cookie", $sid, time() + (60*60)); echo "<meta http-equiv=\"Refresh\" content=\"0;url=page.php\">"; and then have a link to logout which is this. setcookie("cookie", " ", time()-31536000); echo "<meta http-equiv=\"Refresh\" content=\"0;url=login.php\">"; It works fine in IE and firefox, but logout doesnt work in opera. Anyone have any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/73385-solved-loginlogout/ Share on other sites More sharing options...
kratsg Posted October 16, 2007 Share Posted October 16, 2007 I'm sure there's a thing with Opera and headers, try this instead: setcookie("cookie", $sid, (time() + (60*60))); header("Location: page.php"); setcookie("cookie", "justsomefiller", (time()-31536000)); header("Location: login.php"); Quote Link to comment https://forums.phpfreaks.com/topic/73385-solved-loginlogout/#findComment-370273 Share on other sites More sharing options...
tj71587 Posted October 18, 2007 Author Share Posted October 18, 2007 Thanks, that worked well. Quote Link to comment https://forums.phpfreaks.com/topic/73385-solved-loginlogout/#findComment-371995 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.