Hi,
I run into a problem which didn't occur to me until now. I have been using cookies and session global variables before and they always worked but right now on my login page, right after the user is validated, the cookie I set is displayed with the correct value while after I redirect the user to another page, the cookie value becomes null for some reason. The same thing happens with the session variables... Here's the line of code for setting the cookie:
The server is located at www.eveduhamel.com ... it is not a subdomain... However, for the moment, the database is not hosted with the same host provider... The website will be moved to www.trendiac.com this week probably...
I just checked the cookie variable I have been setting yesterday by going to Firefox's Options menu in the Privacy tab and it is still there with the right values I gave them... The thing is that I cannot display them for the user to see... Is this syntax incorrect? echo($_COOKIE['test']);
Can you show some more code? Like a sample page that sets the cookie and a sample page that reads the cookie with the minimum amount of code to reproduce the problem.
I also get the following error message in login.php...
Warning: Cannot modify header information - headers already sent by (output started at /home/eveduha/public_html/trendiac.com/dev/test/login.php:11) in /home/eveduha/public_html/trendiac.com/dev/test/login.php on line 32
I think I found the solution to the cookie variable issue... It was only the fact that the cookie was set from the file include/login.php and the index.php file was not placed in the same folder... I have set the path parameter to "/" and it now works fine...
Bookmarks