| 
 Posted by Zoe Brown on 10/10/05 19:54 
"maisam" <maisamPOISTA@luukku.com.invalid> wrote in message  
news:434a9b68$0$7553$9b536df3@news.fv.fi... 
> Zoe Brown wrote: 
>> "maisam" <maisamPOISTA@luukku.com.invalid> wrote in message  
>> news:434a90e9$0$26817$9b536df3@news.fv.fi... 
>> 
>>>Zoe Brown wrote: 
>>> 
>>>>"JDS" <jeffrey@example.invalid> wrote in message  
>>>>news:pan.2005.10.10.15.55.03.894107@example.invalid... 
>>>> 
>>>> 
>>>>>On Mon, 10 Oct 2005 15:22:32 +0000, Zoe Brown wrote: 
>>>>> 
>>>>> 
>>>>> 
>>>>>>How do I do redirect a page to a new page in php ??? 
>>>>> 
>>>>>Maybe you mean "header()"? 
>>>>> 
>>>>>http://us2.php.net/header 
>>>> 
>>>> 
>>>>thanks. 
>>>> 
>>>>when I try this I get the error 
>>>> 
>>>>Warning: Cannot add header information - headers already sent by  (...) 
>>> 
>>>As the error message puts it... headers are allready sent and you cannot  
>>>add any. You have probably already printed out something or called  
>>>ob_start, make sure you call the header() function before any such output  
>>>statement. 
>>> 
>> 
>> 
>> argh !! I dont get it this is my entire script - what is wrong with it ? 
>> <?php 
>> 
>> $username="sggdfgfg"; 
>> 
>> $password="xgsdfgyz"; 
>> 
>> if (($_POST['username']==$username) && ($_POST['password']==$password)){ 
>> 
>> header("Location: main.html"); 
>> 
>> } 
>> 
>> ?> 
>> 
>> 
> 
> So this is the "index.php" or whatever your configuration considers the  
> default? 
> 
> If not and this script gets included from another script then whitespace  
> anywhere outside "<?php ?>" in the script including this one would cause  
> such behaviour. It's just the same as having printed out something. 
 
the default page is index.html and the php script is an iframe and I guess  
that is the problem...
 
[Back to original message] 
 |