probably not a good idea to use cookies, what you need are sessions.
Sessions are constant information parsed from page to page as long as each page has the function session_start() before any headers are sent through.
eg if someone logs in you should record their user id like this:
$_SESSION['UserID'] = 1;
then simply check on each page if the session is set
to unset a session use:
session_unset();
session_destroy();
which will remove all sessions