I'm going to use cookies and sessions to indentify the user. So, sessions will be used only when user chose the 'Don't remeber me' option.
I include the identification file in the top of every page of website.
User's session looks like $_SESSION['user']
And than is my question:
Must I place to the authentication file session_start() instruction? I asked it because new session creates every time I use this instruction.
Update http://pastebin.com/Nh3zj6mR user identification script
if (isset($_COOKIE['rwt'])) { $QH=$this->_DBH->prepare("SELECT * FROM accounts WHERE cookie=:cookie_value");You can simple edit the cookie to another username, and there your are. It is better to use some sort of hash, store that in the cookie, en get the data you need from the database with that hash. Also bind a that cookie to one ip address.