sessions somehow being destroyed on success/failure page
Hi Guys,
Having a little bit of a problem!
I log in to my site, add to basket to the point where it added the order to the database (all perfectly fine!).
I've integrated this cart with sagepay.
When I get redirected to the success page however ALL my sessions are destroyed!
I have no destroy/unset session on the page, and it's happening on both the failure and success page.
The even weirder thing is the fact it only happens on IE and furthermore, it seems to work on MY IE, but not another computers IE (both windows 7, both home premium, both 64 bit.
Have you got any ideas what may be causing this problem?
I've attached the success page just in case.
===========================
<?php session_start(); ?>
<?php
//WA eCart Include
require_once('Connections/db.php');
require_once("WA_eCart/skincentrics_PHP.php");
?>
<?php require_once("WA_eCart/checkoutScripts/Protx_VSPForm.php"); ?>
<?php
$skincentrics->GetContent();
?>
<?php
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
...
</head>
<body>
...
...
if ($Protx_VSPForm_Bindings["VPSTxId"] != "") {
...
mysql_query("UPDATE orders SET
orderStatusCode = 1,
OrderVendorTransactionCode = " . $Protx_VSPForm_Bindings["VendorTxCode"] . ",
OrderSagePayTransactionId = " . $Protx_VSPForm_Bindings["TxAuthNo"] . ",
OrderTrackingNumber = '" . $Protx_VSPForm_Bindings["VPSTxId"] . "'
WHERE OrderID = " . $_SESSION['skincentrics_OrderID'] . "");
mysql_query("UPDATE orderdetails SET
DetailCompleted = 1
WHERE DetailOrderID = " . $_SESSION['skincentrics_OrderID'] . "
");
$getItems = mysql_query("SELECT * FROM orderdetails WHERE DetailOrderID = " . $_SESSION['skincentrics_OrderID'] . "");
if ($_SESSION['skincentrics_OrderID']) {
while ($fetchItems = mysql_fetch_array($getItems)) {
mysql_query("UPDATE product_lock SET
product_lock_complete = 1
WHERE product_lock_product_id = " . $fetchItems['DetailProductID'] . " AND product_lock_order_id = '" . $_SESSION['skincentrics_OrderID'] . "'");
if ($fetchItems['DetailProductID'] == 22 or $fetchItems['DetailProductID'] == 23) {
$todayDate = date("Y-m-d");
$dateingToInsertEnd = strtotime(date("Y-m-d", strtotime($todayDate)) . "+1 month");
$dateingToInsertEndFinal = date('Y-m-d', $dateingToInsertEnd);
mysql_query("UPDATE users
SET users_expiry_date = '" . $dateingToInsertEndFinal . "'
WHERE users_id = " . $_SESSION['kt_login_id'] . "");
}
}
}
}
?>
...
</body>
</html>
======================
Regards,
Joe.