Solved

how many methods are there to redirect to another page?

Posted on 2009-05-04
5
294 Views
Last Modified: 2012-05-06
i am using an iis server, is there any method to redirect other than

header('location: c.php'); it is not working on my iis server but working on wamp server.
0
Comment
Question by:designersx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 24301960
>> is there any method to redirect other than header('location: c.php');

Yes, you can try use javascript to make a page redirection, like:

<script language="javascript">
location.href = "c.php";
</script>


or use Meta Tag redirection, like:

<html>
<head>
<meta http-equiv="refresh" content="10; URL=c.php">
</head>
...
0
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 24301967
sorry, for immediate redirection, 2nd method should be as:

<meta http-equiv="refresh" content="0;URL=c.php">
0
 

Author Comment

by:designersx
ID: 24302005
thanks
0
 

Author Comment

by:designersx
ID: 24302011
sir what is the meaning of this that we generally say,

 
header should be posted first before any output. can u give a small example understanding this?

0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 24302077
>>header should be posted first before any output

you mean in php?

basically it means we cannot write any output (example using echo command) to the page before the command "header" in php, because the header information already been modified.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get data from two MySQL tables 6 66
Do not understand error message 3 46
Testing a list of Emails for validity 4 35
Tell me if I understand this correctly... 6 21
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question