how many methods are there to redirect to another page?

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.
designersxAsked:
Who is Participating?
 
Ryan ChongConnect With a Mentor Commented:
sorry, for immediate redirection, 2nd method should be as:

<meta http-equiv="refresh" content="0;URL=c.php">
0
 
Ryan ChongCommented:
>> 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
 
designersxAuthor Commented:
thanks
0
 
designersxAuthor Commented:
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
 
Ryan ChongCommented:
>>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
All Courses

From novice to tech pro — start learning today.