Ok I'm no expert on cookies and I know sweet f.a. about sessions. User information for my webby is stored on a MySQL database and I know my way around that.
At the moment when someone goes to the website they login using a simple form with a 'Username' textbox, a 'Password' textbox and a 'Keep me logged in on this machine' checkbox. This is then compared to the database. If the checkbox is unchecked then I just create a temporary cookie storing username and password. If the checkbox is checked then I create a year long cookie on their machine.
Both ways work fine except for the fact that after the form is submitted and I've displayed the message saying 'Login successful!' the whole site (it uses three frames; header, navbar and main - the login form is displayed in main) has to be refreshed before any of the other pages take any notice of the cookie. I know I can get around this with excessive use of refresh meta tags but that's crap.
On top of that I know from reading these forums that this isn't the best way to handle logins anyway. Am I right in thinking that sessions would be better? If so can anyone point me to a good, step by step tutorial and will the problem I'm currently having no longer be an issue with sessions?
Cheers!