scott532 Posted August 21, 2006 Share Posted August 21, 2006 Parse error: parse error, unexpected T_ELSE in /usr3/home/cuttingclub.com/htdocs/pravana/v2/php/mail_list/php_mail.php on line 122[code] if (strpos($_POST['to'],"@") >= 0) { //send the mail echo "<BR>To: $to<P>"; echo "Subject: $_POST[subject]<P>"; echo "Body: $body<P>"; echo "$from_header<P>"; echo "$add_header<P>"; if(!isset($add_header)){ if (mail($to, $_POST['subject'], $body)) { echo "<h3>Your email has been sent</h3>"; } else { echo "An error occured, and your email has not been sent"; } } else if (mail($to, $_POST['subject'], $body, "$from_header"."$add_header")) { echo "<h3>Your email has been sent</h3>"; } else { echo "An error occured, and your email has not been sent"; } } else { echo "A bad email address was encountered"; } } else { // Line 122 ?>[/code]Please Help, Thank You Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 21, 2006 Share Posted August 21, 2006 make sure you nest your statements properly....BOTH the final else code blocks have no starting if block Quote Link to comment Share on other sites More sharing options...
Jeremysr Posted August 21, 2006 Share Posted August 21, 2006 I think you have too many }'s. Try removing each one right before the else or elseif statements (except for the first else statement). Because it looks like you have 2 }'s before each one. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.