i was developing my php application and using mysql to store session data and $_SESSION was working fine in both root and subfolers. but now when i create new subfolers , writing sessions works in them but i can't read the sessions . for example
$_SESSION['username'] = 'james';
it works fine and both session_id and session_data are stored in my mysql session table. and the session id stored in my browser matches the id in table but when i want to use it(read data from mysql) it doesn't work in new subfolers . for example:
it doesn't work. and it's funny because when i copy the file in my previous subfolers it works all fine. and i don't use .htaccess in my subfolers.
really confused. thanks for help
You're probably missing
session_start(); on one or more pages.
Edit: Like Zanrok said, it's hard to diagnose your problem without seeing any of your code.