[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-windows
Subject:    Re: [PHP-WIN] need help! plz
From:       Jarrett Meyer <jmtmeyer () yahoo ! com>
Date:       2008-03-24 13:50:57
Message-ID: 47E7B1C1.8000001 () yahoo ! com
[Download RAW message or body]

You can't call the header after you've sent output to the client (i.e. the 
'echo' statement).

Redirect first, then check the mail state, stored as a session variable or 
something similar.

Hooman Fatoorehchi wrote:
> dear all,
> 
> I want to make a form-to-email page and I want to diplay a messagebox after
> the mail is send and then I want it to be redirected to another page. I used
> JS for the msgbox but the header function wont work in this case. please
> help me!
> 
> here is the code
> ...
> mail( "m <bomber6man@yahoo.com>e@mysite.com", "Feedbacks",$message, "From:
> $email" );
> echo "<script language=javascript>alert('Your message was sent
> successfully!');</script>";
> header( 'Location: http://www.blah blah.com" ) ;
> ?>
> 
> 
> thank you
> Hooman
> 

-- 
Jarrett M. T. Meyer, M.B.A.
jmtmeyer@yahoo.com
http://www.jarrettmeyer.com

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic