I am working on sessioning scripts however my cookies are not carrying over from page to page.
I include the session script on every page which checks the $_COOKIE['session'] cookie, and if set, keeps the session data, if not, creates a guest session and sets a cookie with a new key.
I can see in my SQL Table that the key is being created, however, if I brows to a page on sub directories, it creates a new key.
In the sub dir, the $_COOKIE['session'] variable is empty...
I am setting the cookies with the folling line:
setcookie("session", $SessionID, time() + 900, '/', '.example.com' );
If anyone could point me in the correct direction, that would be great.
*Note, cookie need to be accessed and set in every directory.