Thread: else problem
View Single Post
Old 11-11-2008, 05:24 PM   #2 (permalink)
tony
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

I am not sure now, what could be. can you tell us what type of error do you get?

also restructuring a little the code:

PHP Code:
if (is_null($name) || is_null($phone) || is_null($email) || is_null($message)){
    
header("Location: http://www.url.com/error.php");
} else { 
    if(
mail($recipient$subject$body$header))
        
header("Location: http://www.url.com/thanks.php");

that might help, maybe the error carry over from the mail function being inside parenthesis
tony is offline  
Reply With Quote