tags:

views:

35

answers:

0

I have 2 php files that are being used to set and retrieve a very specific session variable.

The initial script sets the value like:

require_once './includes/bootstrap.inc';    
drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);

if(($_POST['region'])){
    $_SESSION['region'] = $_POST['region'];
    print '1';  
}else{
    print '0';
}

and the other page that retrieves the value looks like:

require_once './includes/bootstrap.inc';    
drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);

if(isset($_SESSION['region'])){
    print '1';  
}else{
    print '0';
}

My issue is that the script that needs to retrieve the value (in a seperate external page, as is the one that sets it) always sees the $_SESSION array as being empty.

I've updated my $base_url just incase.. and I've also printed out the session_id() and manually gone to each external page to ensure they match, and they do.

I'm at a loss as to what to do at this point?

Any takers?

related questions