Forum Moderators: coopster
The cookies are not set anymore and I should of got the if !isset. I can click enter a gazillion times with the logout url and it'll keep showing me my if isset not the if !isset.
When I open a new tab and try it again in the old tab it'll finally show the if !isset.
I do I get rid of that? Seems like some kind of browser cache. This only happens with IE and not FireFox.
The following is my logout.php
####################START#######################
<?php
if (isset($_COOKIE['id']) && isset($_COOKIE['idsession']) && isset($_COOKIE['ip'])){
include ('c/connect.php');
setcookie('id', '', time() -3600);
setcookie('idsession', '', time() -3600);
setcookie('ip', '', time() -3600);
include ('header.php');
include ('sideleft.php');
?>
<div id="maincolumn">
<div class="text">
You have successfully logged out of HappyProfile.com
<br />
Thanks for visiting and come back soon!
<br />
<a href="login.php" style="font-weight:bold;">Log Back In</a>
</div>
</div>
<?php
include ('footer.php');
}//End cooke is set
if (!isset($_COOKIE['id']) && !isset($_COOKIE['idsession']) && !isset($_COOKIE['ip'])){
include ('c/connect.php');
include ('header.php');
include ('sideleft.php');
?>
<div id="maincolumn">
<?php
require ("error.php");
?>
</div>
<?php
include ('footer.php');
}//End cookie is not set
?>
####################END#######################
[edited by: Walley at 2:27 pm (utc) on May 26, 2009]
<?php
include ('c/connect.php');
if (!empty($_COOKIE['id']) && !empty($_COOKIE['idsession']) && !empty($_COOKIE['ip'])){
if (isset($_COOKIE['id']) && isset($_COOKIE['idsession']) && isset($_COOKIE['ip'])){
setcookie('id', '', time() -3600);
setcookie('idsession', '', time() -3600);
setcookie('ip', '', time() -3600);
include ('header.php');
include ('sideleft.php');
?>
<div id="maincolumn">
<div class="text">
You have successfully logged out of HappyProfile.com
<br />
Thanks for visiting and come back soon!
<br />
<a href="login.php" style="font-weight:bold;">Log Back In</a>
</div>
</div>
<?php
include ('footer.php');
}//End if isset
else {//Go to if !isset
include ('header.php');
include ('sideleft.php');
?>
<div id="maincolumn">
<div class="text">
You are already logged in.
<br />
<a href="user.php" style="font-weight:bold;">My Account</a>
</div>
</div>
<?php
include ('footer.php');
}//End go to if !isset
}//End if !empty cookie
else {//Go to error.php
?>
<div id="maincolumn">
<?php
include ('header.php');
include ('sideleft.php');
require ("error.php");
include ('footer.php');
?>
</div>
<?php
}//End else go to error.php
?>
[edited by: Walley at 1:41 am (utc) on May 27, 2009]