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

What is the difference between session_unregister() and session_unset()?

577


Will react hooks replace redux?

511


Why delimiter is used in mysql?

550


What are the features of php?

556


How do you pass a variable by value?

583






Tell me what sized websites have you worked on in the past?

504


What are the advantages of object-oriented programming in php?

504


What is different between software and app

1231


What is composer used for?

514


Tell me what does $_env means?

534


What are the features of php 7?

505


Why is php used for web development?

501


What is the maximum size of a database in mysql?

527


What is empty () in php?

526


Tell me what does the php error 'parse error in php - unexpected t_variable at line x' means?

563