According to the cookie specification, any cookie set for one domain, must not be sent to any other domain. Therefore, if you set a cookie in your user's browser on one domain, that cookie will not be available on any other domain. This tutorial describes a solution to get around this issue.
This document describes how to customize the session handlers in PHP4. It provides examples of how to write a fully functional session handler that works with DBM files and one that works with a MySQL database.