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
How can I use single quotes in single quotes in php?
What are php data types?
Tell me how comfortable are you with writing html entirely by hand?
Which is not a file-related function in php?
What is difference between put and post method in http?
How do we get the current session id?
Which software is best for php?
What is the difference between array_merge() and array_merge_recursive() in php?
Differentiate between php5 and php7?
Tell me what's the difference between include and require?
Which function will you use to create an array?
How long is csrf token?
Can I learn php in a month?
What is a php object?
Tell me how can I display text with a php script?