I am trying to get my head around using sessions with a database. I have seen a number of books and articles discussing PHP's session support and how to use session variables with databases, and while most of them mention cookies, they are usually not very specific about the relationship between the session system and what is stored in the cookies.
Very simply, I am trying to develop a general-purpose session system for my applications which will identify a user by his cookie, match the cookie information to the user's profile in the database, then use PHP's session functions to maintain the user's session during the application.
So can anyone recommend a good reference article on sessions and cookies?