In trying to diagnose the problem, I'm carrying the session id across all the pages in the querystring and using session_id($_GET['sid']) to restore the session on each page.
I also tried session_write_close() on the previous page and the popup, but the session vars in the popup still do not get saved to the database.
Page 1 is just login and sets a session var saying that the user is logged in and another var containing the user's database name.
Page 2 supplies the user with 2 drop-downs and a submit button. When the submit button is pressed, the form is submitted to itself and window.open is echoed to open page 3.
Page 3 (problem page) sets 2 more session variables (do not get saved) and uses the previous session variables to query the db for info (which works). If I echo the 2 session vars I just created, they do work on this page.
On page 3 there is a table cell with an onclick parameter that calls a javascript function which in turns calls a php page (page 4/ajax).
Page 4 is unable to get the information from the 2 session vars created in page 3, but can access the session vars created during login.