Thread: else problem
View Single Post
Old 11-11-2008, 06:02 PM   #5 (permalink)
Runar
The Contributor
 
Runar's Avatar
 
Join Date: Nov 2008
Location: Norway
Posts: 58
Thanks: 20
Runar is on a distinguished road
Default

It would be better to do the last part this way:

PHP Code:
elseif( mail$recipient$subject$body$header ) )
{
   
header'Location: http://www.url.com/thanks.php' );

Unless you are going to do something like the following:

PHP Code:
if( your first if )
{
   
// some stuff
}
else
{
   if( 
mail$recipient$subject$body$header ) )
   {
      
header'Location: http://www.url.com/thanks.php' );
   }

   else
   {
      
// failed to send mail
   
}

Send a message via MSN to Runar
Runar is offline  
Reply With Quote