php - The SESSION array variable i set with ajax is not getting saved?
===

I have a link, that when clicked, calls a jquery ajax function to get data from a php page, and puts the returned html in a popup div.

The returned html is actually a form. In the php, I am querying the db to get a list of licenses matching the user's specs, and I save them in an array. Then, I save the array in the $_SESSION variable.

When the user submits this form, it calls another ajax function to get more html for the popup div (wizard-style). I need to use the array stored in the $_SESSION variable here, but all I get is a blank array (missing the values).

Here is a sample of the php code

    //step 1
    $renewable_licenses = db_query_array($sql);
    $_SESSION['renewable_licenses'] = $renewable_licenses;
    $_SESSION['hello'] = "hello!";
    print_r($_SESSION); //I can see all the session vars, 
                          //including the array with all it's values, and "hello!"
    
    //step 2
    print_r($_SESSION); //I see the standard session vars set in other pages, I see
                     //"hello!", I see [renewable_licenses] but it is an empty array!

The ajax is working fine, i see the form and the correct fields all showing up perfectly. I checked the session_id on both ajax calls and they are the same. session_start() is being called first thing on both pages. why can't I access my array in the second step??