direct url access in php : Suppose, I have several pages in project(login.php,terms.php,profile.php,
add_user.php etc).login & terms are consecutive pages. After entering correct credential user will come to terms.php page to accept T&C which include a checkbox.
So my requirement is when user accept T&C then redirect to profile page and its working fine. Now i want if user try to change url of any different page which is related to profile section(eg.profile.php,add_user.php..... any page) without accepting T&C then it should redirect to same page.i.e terms.php. I want to restrict user to access any page without accepting T&C by direct changing the url.[enter image description here][1] 


  [1]: https://i.stack.imgur.com/P14B1.png