<?php //If cookie exists, retrieve it and put it in an array for use. if (isset($_COOKIE['cookie'])) { $employee=$_COOKIE['cookie']; } else if (!isset($redirect)){ header('Location:index_nologin.php'); } ?>