Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Handling Session


mike2001

Recommended Posts

Posted

Hi folks,

 

I have a problem with handling session in osc MS 2.

 

I made a little change to osc MS 1 ==> i save the zip code of a visitor in session varaible "idzip" so i can show him only the product avaliable in his area.

 

it works like a charm but when i upgrade to MS2, the session variable is always empty even if a visitor enter his zip code.

 

Any help would really appreciated

 

The code i use to register the session is :

 

<?php

$idrate = $row_location['id_zip'];

session_register("idrate");

?>

 

the code used to print the session varaible :

 

<?php echo $HTTP_SESSION_VARS['idrate']; ?> ( it's always empty after i upgrade to MS 2

 

thanxs

Posted

Looks ok. All I can recommend is go back and VERY carefully make sure you have the correct variable name. If it's not exactly the same you would see this result. Also make sure you don't have any

"(If $id_zip = '')" type of statements that are making an assignment instead of a comparison.

 

HTH.

--

Lloyd

 

"Managing programmers is like herding cats."

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...