The problem is that I can't set a cookie from PHP. I've tried to google the problem and searching here on stackoverflow, but none of the solutions work.
I've tried:
setcookie('user_id', $row['user_id'], time() + ( 60 * 60 * 8), '/', '127.0.0.1');
setcookie('user_id', $row['user_id'], false, '/', false);
setcookie('user_id', $row['user_id'], time() + ( 60 * 60 * 8), '/', false);
setcookie('user_id', $row['user_id'], time() + ( 60 * 60 * 8), '/', '');
The browser I'm using is Firefox 12 and Chrome 19 on an Apache server.
Thanks for your help.
EDIT: There seems to be a problem with my database when I fetch data to put in my cookies, so nevermind;) thanks for your time!