tags:

views:

36

answers:

1

Hello,

If i call a php script using ajax im unable to access session variables set by another php script though both scripts are on the same domain, and i have session_start() in both the scripts. If however the php script is called directly it is able to access session variables. Why does this happen ?. Any way to fix the problem ?

Please Help. Thank You.

A: 

Use something like Firefox's HTTPFox or FireBug to view what's going across the wire when you directly visit the URL or do it via Ajax. Most likely the session cookie isn't being sent properly (or at all) with the AJAX call, so a new blank session is being created.

Marc B