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

Explain me the difference between include and require?

704


What’s the special meaning of __sleep and __wakeup?

713


Why php is used with mysql?

762


What is php oops concepts?

694


Which library is used in php to do various types of image work?

739


How to get number of days between two given dates using PHP?

666


Tell me how to set a page as a home page in a php based site?

693


List few sensible functions in PHP?

752


Declare a new variable in php equal to the number 3;

696


What is the correct line to use within the php.ini file, to specify that 128mb would be the maximum amount of memory that a script may use?

776


What is a composer?

727


What is the difference between echo, print and printf()?

694


What is difference between rest and http?

717


What is difference between echo and print_r in php?

689


Write a program in php to check whether a number is prime or not?

696