Existing Database results are overwritten upon successful transaction
Hello, I have used ECart to setup a shopping cart with PayPal. The data is written into the database, however it erases whatever was in the "Orders" table prior to the transaction.
Order ID is always (1)
Why won't it store the orders in the "Orders" table?
I have done three test transactions and they show up in both the buyer and seller's Paypal accounts, however every transaction erases the prior transaction in the database. I'm using a live PayPal testing (Not Sandbox) with a test product.
Any thoughts?
______________________________
Solved - I used the following code that killed the session once we came back to the success page. As I read in a forum thread, the following code was placed just after the </html> tag (Worked like a charm)
<?php
// Initialize the session.
// If you are using session_name("something"), don't forget it now!
@session_start();
// Unset all of the session variables.
$_SESSION = array();
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
@setcookie(session_name(), '', time() - 42000,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
}
// Finally, destroy the session.
@session_destroy();
@session_regenerate_id();
?>