note 51806 deleted from function.header by betz
| From: | betz@php.net | Date: | Tue, 12 Apr 2005 13:51:02 +0000 |
| Subject: | note 51806 deleted from function.header by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-87903@lists.php.net to get a copy of this message | ||
Note Submitter: baktec at gmail dot com
----
I'm planning to do a simple authentication. I want to redirect the page to another php page
file if the user name and password is correct.
But. I'm having a problem with the header().
HERE is the part of my code that is showing the error.
<body>
<?php
if ($p = $u)
{
header("Location:1.php"); //I'm getting the error below
/*Warning: Cannot modify header information - headers already sent by (output started at
C:\WebRoot\mySite\auth.php:3) in C:\WebRoot\mySite\auth.php on line 4*/
exit;
}
?>
</body>
How can i solve this problem?