Cannot set session variable
I have have a simple problem which I feel like it can be easily solved. I have a folder named "Processing" with a file named login.php inside. I also have an index.php file and a dashboard.php file outside of that folder.
If I try to use $_SESSION['test'] = "test" inside the index.php file and output this variable on the dashboard.php file with echo($_SESSION['test']); it works.
However, if I try to set the test session variable from within processing/login.php, it is not setting the variable anymore! I had the same problem with the cookie variables and I fixed it by passing a "/" argument to the function setcookie()... However, I dont know how to do something similar for the session variable...
If that's the issue, you might be able to do the same thing with session_set_cookie_params() (I typed that from memory, so it might not be quite right ).
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)