![](https://wpdevkit.in/wp-content/themes/twentytwenty-child/imgs/post01.jpg)
How to redirect a page to another page in php?
![](https://wpdevkit.in/wp-content/themes/twentytwenty-child/li_st1.png)
![](https://wpdevkit.in/wp-content/themes/twentytwenty-child/li_st1.png)
![](https://wpdevkit.in/wp-content/themes/twentytwenty-child/li_st1.png)
![](https://wpdevkit.in/wp-content/themes/twentytwenty-child/imgs/kand5.png)
Redirect a page to another page in php
function logoutpage(){ echo '<script LANGUAGE="JavaScript">window.location.href="'.site_url().'/logout/";</script>'; } function dashboard(){ echo '<script LANGUAGE="JavaScript">window.location.href="'.site_url().'/dashboard/";</script>'; } function loginpage(){ echo '<script LANGUAGE="JavaScript">window.location.href="'.site_url().'";</script>'; } //Ex. code used in logouy page <?php /* Template Name: Logout */ session_start(); session_destroy(); session_unset(); loginpage(); ?> <script> location.reload(); </script>
![](https://wpdevkit.in/wp-content/themes/twentytwenty-child/author.jpg)
POST COMMENTS