I know how to set cookies, thanks. Until now I was using a cookie stored in the MySQL to log in the users that required to remember their login, and then the php session cookie to store all information.
But I read that PHPSESSIONS are slow if there are lots of users, and there's the problem I was saying. And there's no reason to do that with 2 cookies, I should be able to do that with one, no?
So basically I just want to confirm that in my case I should forget the PHPSESSIONS, and store all that in the MySQL, and make a query every time the user makes an action.