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
Explain me the difference between include and require?
What’s the special meaning of __sleep and __wakeup?
Why php is used with mysql?
What is php oops concepts?
Which library is used in php to do various types of image work?
How to get number of days between two given dates using PHP?
Tell me how to set a page as a home page in a php based site?
List few sensible functions in PHP?
Declare a new variable in php equal to the number 3;
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?
What is a composer?
What is the difference between echo, print and printf()?
What is difference between rest and http?
What is difference between echo and print_r in php?
Write a program in php to check whether a number is prime or not?