Re: header problem with IIS
| From: | Christoph Grottolo | Date: | Thu, 15 May 2003 14:15:29 +0000 |
| Subject: | Re: header problem with IIS | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19948@lists.php.net to get a copy of this message | ||
misun@microstep-mis.com (Peter Misun) wrote:
>
>running PHP4.1.3 on IIS 5 and everything work's fine
>
>I have only problem with using header() function
>problem is, after submiting form in first.php:
> echo "<form name=form_abc method=post action=second.php>\n";
>and having in second.php:
> header('location:third.php');
>
>it produces error in browser like this:
> CGI Error [...]
You must avoid body contents in second.php (do not generate any
output).
Try with:
<?php
header("Location:third.php");
exit;
?>
as second.php, this should work. If you don't put an exit call after
header(), you must make shure you have no output (no newlines and/or
spaces before opening <?php and after closing ?> tags, no echo's nor
print's...).
Christoph