Alright so heres the breakdown. A user logs in and i set 2 cookies username and password then at the top of every page i check if the password cookie matches the password in the db which matches to the username. If it it does i define() LOGGED to be 2 telling me there logged in. But I was thinking and wondering these things? Is define stored locally on each user's computer or is it a site wide thing? can i define the same thing like STATUS different for each user like for me make it active but another user make it away and have this all at the same time?
Constants are stored in the server's memory, and are more secure than variables because they can't be overwritten. And I don't understand the second question. However, as for your cookies, I don't suggest storing the password in it (Unless it's encrypted). But I would suggest using sessions, as the security and compatibility is higher.