Re: Using header in if statement
| From: | Adam Voigt | Date: | Fri, 27 Jun 2003 13:07:35 +0000 |
| Subject: | Re: Using header in if statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-153113@lists.php.net to get a copy of this message | ||
Just have it echo, example:
echo "<meta http-equiv=\"refresh\"
content=\"0;url=http://192.92.0.248/company_search/admin/admin2.php\">";
On Fri, 2003-06-27 at 09:03, Gary Ogilvie wrote:
> If I attempt to direct the user to a url with in a if statement using a
> header I get the following error message:
>
> Warning: Cannot modify header information - headers already sent by
> (output started at c:\inetpub\wwwroot\company_search\admin\login.php:3)
> in c:\inetpub\wwwroot\company_search\admin\login.php on line 48
>
> The code I am trying :
>
> if ($myUser == $myReturnedUser && $myPass == $myReturnedPass) {
> ("Location:
> http://192.92.0.248/company_search/admin/admin2.php");
> } else {
>
> Is there any other way I can try and do this?
>
> Many thanks
--
Adam Voigt (adam@cryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group