Is the best way to recognize that a user is logged in is by posting a variable in every page that says that - that user is logged in using post?
Sessions would work the best. Take a look at the session articles and PHP session documentation.