How many ways I can redirect a PHP page?

Answer Posted / rajesh bhujbal

1. By using header function as below:
<?php
header('Location: http://www.example.com/');
?>
2. By useing ACTION property of form tag of page:
<form action = “POST” method = “processform.php” >
</form>

3. By using javascript as below:
1- <script>location.replace("index.php");</script>
2-<script>window.href="index.php";</script>

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is it possible to cast types in php?

486


What are the method available in form submitting?

521


Explain the difference between static and dynamic websites?

515


What is json php?

523


Name and explain five of the PHP error constants?

509






What is a PHP Filter?

608


How to invoke a user function?

543


What is echo in html?

489


Starting or restarting a computer is called

607


How can you send email in php?

542


Is empty in excel?

527


What are global variables in php?

495


Is it more secure to use cookies to trfer session ids?

512


How arrays are used in php?

542


What is the purpose of basename() function in PHP?

593