Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how many methods are there to redirect to another page?

Posted on 2009-05-04
5
Medium Priority
?
317 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
  • 3
  • 2
5 Comments
 
LVL 54

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 54

Accepted Solution

by:
Ryan Chong earned 200 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 54

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

782 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