30 مارچ، 2017 - you can use header and session .. when a user logs in .. save his/her id in session variable lets say $_SESSION['user_id'] and in all the pages which only .