Cookies vs. sessions

The concept is storing persistent data across page loads for a web visitor. Cookies store it directly on the client. Sessions use a cookie as a key of sorts, to associate with the data that is stored on the server side. It is preferred to use sessions because the actual values are hidden from the … Read more

Sticky and NON-Sticky sessions

When your website is served by only one web server, for each client-server pair, a session object is created and remains in the memory of the web server. All the requests from the client go to this web server and update this session object. If some data needs to be stored in the session object … Read more

S_SESSION variable (user role) not recognised

Session login and start, with Session variables declaration and store: Variable $_SESSION[‘estado’] works fine as it loads content if it is activo, and if not locates to other directory: But it does not seem to recognise $_SESSION[‘us_type’], as even when Database has correct fieldname and value *(us_type, 1)* php does not load under this conditional, locating user as if … Read more