Ok, I've never used cookies a whole lot, but I want to make a neat login for some blogging software I'm writing and not have to have the user re-enter information every time they go to the site, well, unless they want to. So, basically, I'm going to have an option; use cookies on login, or don't, and use a session instead. Now, I've never used sessions at all, but aside from that, I want to know what the best way to update a cookie is.. After a user is logged in, I want them to have their login information stay stored in an active cookie as long as they are active on the site, and this will make them never re-login if they are visiting every day. I know many message boards do this; phpBB, vBulletin and Invision for example, as I haven't actually logged into this board for over 3 months. I'm thinking of having an include that just sets a cookie for every visit, and include it in a header that will be included in every page.. but I think that'd be overkill. I'm thinking of it as it will make a new cookie every time it's executed, rather than update the current cookie if there is one.

Not sure if I made myself clear; but any help is appreciated.