Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Redirect User To Different Page

 
header("Location: pagename.php");
Comment

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>
///////////////////////////////////////////
Comment

PREVIOUS NEXT
Code Example
Php :: php serve a video (THE ONLY WORKING CODE) 
Php :: php multiplei str 
Php :: wordpress query a post by id 
Php :: laravel filter 
Php :: Route [login] not defined.Route [login] not defined. 
Php :: str_contains php 5 
Php :: php call non static method from static method 
Php :: laravel get list of files in directory 
Php :: laravel form request validation api 
Php :: laravel validation on update 
Php :: php remove everything before colon 
Php :: how to re assign value of associative array after assign in php 
Php :: php warning array to string conversion 
Php :: divide page in pdf with page break using php 
Php :: how to enable autoreload on save laravel 
Php :: php remove html tag wrap 
Php :: php catch fatal error 
Php :: php unix socket client 
Php :: withcookie function in php 
Php :: curlopt_postfields php example 
Php :: unset method 
Php :: how to check if page opened from mobile or desktop 
Php :: download file on client from server url php 
Php :: laravel get next and previous record 
Php :: laravel api error return homepage 
Php :: yajra datatables html column bulder example 
Php :: how to delete a row in phpmyadmin 
Php :: echo foreach 
Php :: wamp php version update 
Php :: how to delete database in phpmyadmin 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =