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 to create a mysql connection?
Are php short tags acceptable to use?
How to remove duplicate values from array using php?
How to calculate the length of a string?
How many escape sequences are recognized in double-quoted strings in php?
How to process the uploaded files?
Is it difficult to learn php?
What is the best php framework 2018?
How to list all values of submitted fields?
How to access standard error stream in PHP?
Tell us what is the difference between session_unregister() and session_unset()?
How can you retrieve a cookie value?
Is variable name casesensitive in php?
What is substr in php?
Explain me what are the main error types in php and how do they differ?