Session works only after first visit

Hi All,

I have an issue with the session variable.

shoppingcart.php is the first file executed and contains the following code,

[php]$postal_charges = get_meter_square() * $postageRate;
$_SESSION[‘postalcharges’] = $postal_charges;[/php]

and once the ‘Proceed’ button is pressed its re-directed to purchase.php as following,

window.location='purchase.php';

In purchase.php the value of $_SESSION[‘postalcharges’] doesn’t read. But if I go back and click on ‘Proceed’ again it reads.

Moreover this happens only on Firefox latest one. Can anyone help me on this?

Well, I found the fix for this.

This has happened because I have unset the variable $_SESSION[‘postalcharges’] at the bottom of the same page. Amazingly the problem was only on Firefox!!!

Sponsor our Newsletter | Privacy Policy | Terms of Service