I am building a members section for my site and I was curious what the best way to go about remember users would be. The site I'm working on is mainly an information site which will have the ability for people to login and view reviews on products and also allow manufacturers to login and upload information about their products.
I was curious how I should remember a user is on my site. Currently, I have a $_SESSION[''] variable that remembers them but when they open a new browser it forgets them. Also this posses problems if they are still viewing my site but want to have 2 browsers open while on my site.
This is because your sessions are expiring on closing the browser. You can set the session lifetime with ini_set():
ini_set('session.cookie_lifetime',(3600*24*365)); // makes cookie good for a year