In PHP there are some common way to redirect another page or URL. Here I am going to use some simple way to redirect. In PHP you need to use header() to send a raw HTTP header. In headers() method, you can easily redirect to the new page or URL.
Using headers():
In header() method you must remember to call it before any output is sent. Means nothing should be printed in page.
<?php
//Redirect to page or URL
header("Location: URL or Page Address ");
//End the code with exit
exit;
?>
Using Javascritp:
In this method you can use this JavaScript at any part of your page.
<script language="JavaScript" type="text/javascript"> window.location = "redirect page/URL here" </script>
You can also show any error message to your user:
<script language="JavaScript" type="text/javascript">alert("any message here ")
window.location = "redirect page/URL here"
</script>
Using Meta tag method:
You can use this script at any part of your page.
<?php echo "<meta http-equiv='refresh' content='0;url=redirect page/URL here'>"; ?>
Enjoy!!!

RSS Feeds
Feed Comment 




Leave Your Comments Below