WA_ClearSession not clearing sessions?
I'm sure this was resolved previously, but the following code is not wiping session values. This code is on our checkout_success.php page:
<?php
@session_start();
if (!isset($_GET['framed'])){
// WA_ClearSession
$clearAll = FALSE;
$clearThese = explode(",","PayPal_ECO_Token,PayPal_ECO_PayerID,eCartSMC_Items,eCartSMC_OrderID,NEWuserID,NEWformID");
if($clearAll){
foreach ($_SESSION as $key => $value){
unset($_SESSION[$key]);
}
}
else{
foreach($clearThese as $value){
unset($_SESSION[$value]);
}
}
}
?>
After some digging, I found (http://www.webassist.com/forums/posts.php?id=41903) where you'd previously resolved this, by adding this code:
<script>
if (top.location!= self.location || document.location.href.indexOf("?framed=1") >= 0) {
top.location = self.location.href.replace(/([\?\&])framed=/,"$1unframed=");
}
</script>
...to the checkout_success.php page. However, the sessions are not being wiped, despite this code.
NJ