What are different ways to redirect from on page to other?

Answers were Sorted based on User's Feedback



What are different ways to redirect from on page to other?..

Answer / vishal desai

1). using form action property
2). using javascript ( window.location )
3). using header("Location: .......");
4). using
echo "<meta http-equiv='refresh' content='0; url=....'>";

Is This Answer Correct ?    12 Yes 0 No

What are different ways to redirect from on page to other?..

Answer / cpsarathi79

header("location: xxxx.php");

Is This Answer Correct ?    8 Yes 0 No

What are different ways to redirect from on page to other?..

Answer / jitendra jhariya

one is header(""); and second is with the help of java
script and third is by form action

Is This Answer Correct ?    6 Yes 1 No

What are different ways to redirect from on page to other?..

Answer / pramod

The above syntex will work fine iff

1)there is no blank line before this syntax
2)No echo or print commnad used before this syntax

Is This Answer Correct ?    4 Yes 1 No

What are different ways to redirect from on page to other?..

Answer / lingeswari v.chandra

another method using javascript:

location.replace('url')

Is This Answer Correct ?    2 Yes 0 No

What are different ways to redirect from on page to other?..

Answer / shaik abdul raheem

1.write top of the file ob_start();
2.write header("location:xxxx.php") where u need.
3.write bottom of the file ob_flush();

Is This Answer Correct ?    2 Yes 1 No

What are different ways to redirect from on page to other?..

Answer / guest

using
form action tag
javascript code

Is This Answer Correct ?    1 Yes 0 No

What are different ways to redirect from on page to other?..

Answer / sri harsha

header("location: xxxx.php");--In PHP
location.href="www.yahoomail.com";---In javascript;

Is This Answer Correct ?    1 Yes 0 No

What are different ways to redirect from on page to other?..

Answer / mahesh

Using Php
header("Location: "test.php");
exit();
Using Javascript
location.href='test.php';

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More PHP Interview Questions

for image work which library?

0 Answers  


How do you add a joomla Template in admin panel of joomla? Please mention the steps

3 Answers   Cognizant, T3 Softwares,


How do I escape data before storing it in the database?

0 Answers  


How many data types are used by php?

0 Answers  


"mysql_fetch_row — Get a result row as an enumerated array",this sentence comes from the PHP offical manual.However ,i can not understand the words "enumerated array".I need some help.Thanks a lot to everyone that reply.

0 Answers  






what is Abbreviavion of PHP?

6 Answers  


What is overloading and overriding in php?

0 Answers  


How do you compare strings in java?

0 Answers  


How to send email using php script?

0 Answers  


Write down the code for save an uploaded file in php.

0 Answers  


Is php a float?

0 Answers  


HOW we can use css

3 Answers   ConSim, IPsoft,


Categories