Session works only after first visit

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 19
Joined: Sun Jul 03, 2011 10:12 pm

Thu Jun 06, 2013 4:19 am

Hi All,

I have an issue with the session variable.

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

Code: Select all

$postal_charges	            =	get_meter_square() * $postageRate;
$_SESSION['postalcharges']  =	$postal_charges;
and once the 'Proceed' button is pressed its re-directed to purchase.php as following,

Code: Select all

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?

New php-forum User
New php-forum User
Posts: 44
Joined: Tue May 28, 2013 10:04 pm
Location: India,Lucknow

Thu Jun 06, 2013 8:09 pm

why don't use this redirecting code header('Location:url'); instead of window.location.It may be a problem Also check whether you have cookies enabled in the firefox browser.


Post Reply