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
Why overriding is called runtime polymorphism?
What is new static in php?
How many types of errors in php?
What is difference between strstr() and stristr() in PHP?
Explain the visibility of the property or method?
How is a constant defined in a PHP script?
Write syntax to open a file in php?
Is php a mvc?
How do you create an array in php?
Why do we need session?
Is php 7.0 stable?
Is php 5 still supported?
What is class extend in php?
What are the advantages of indexes in php?
How to call javascript function in php without any event?