Hello guys,
I’m building a website which requires the user to log in for extended periods of time (Think something like facebook). Currently I have it setup where the user and login and logoff. I am planning to introduce cookies so that I can identify the user while he / she surfs through the site. I have two questions:
1.
Should I be using cookies or sessions? Or should I use cookies for the login part then sessions after?
How often should I open connection to the database server? Should I maintain a close connection at the end of every page so that I don’t end up with a gazillion open connections?
Thank you so much.
Regards,
Pembar