I'm about to write some code for mahara. I'm trying to store a variable in a cookie. If I do, it will disappear on the next page.
Example:
foo.php:
...
$myfoo = 'bar';
setcookie('mycookie', $myfoo)
var_dump($_COOKIE)
...
executing foo.php: all the mahara cookies & 'mycookie' is set. Like expected, everything's fine.
bar.php
...
var_dump($_COOKIE)
...
executing bar.php after foo.php: only mahara standard cookies set, but no 'mycookie'.
I can't really explain that.
Also $_SESSION does not work like intended.
My server is set up correctly, cookies generally work.
Has anyone an idea?
Edit: I see the cookies via var_dump in my foo.php. Even if I stop to set them. They are there. But not on other pages.