Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

redirect user when want to access html page

add a script in the very top of your page to check for example if the user is logged In : 
//////////////////////////////////////////
<script>
  if (window.sessionStorage.getItem("data") == null) {
    window.location.replace(
      "http://localhost/hospital/front-end/public/index.html"
    );
  }
</script>
///////////////////////////////////////////
 
PREVIOUS NEXT
Tagged: #redirect #user #access #html #page
ADD COMMENT
Topic
Name
7+3 =