Forum Moderators: coopster
I am trying to send an email to the user after he/she submits the form. I get a blank page. My code is find, without the "send email section". Can you look at that section and see what (") or (') or (;) or (;)is out of place.
Thanks
SenMar
<?php
if(!isset($_POST['submit']))
}else{
if(!isset($_POST['first_name']) ¦¦ strlen($_POST['first_name']) <= 0)
{
echo 'Error: You did not enter first name.<br />';
exit();
}
if(!isset($_POST['last_name']) ¦¦ strlen($_POST['last_name']) <= 0)
{
echo 'Error: You did not enter your last name.<br />';
exit();
}
if(!isset($_POST['member_addressl']) ¦¦ strlen($_POST['member_address']) <= 0)
{
echo 'Error: You did not enter your address.<br />';
exit();
}
if(!isset($_POST['address2']) ¦¦ strlen($_POST['address2']) <= 0)
{
echo 'Error: You did not enter your address2<br />';
exit();
}
if(!isset($_POST['member_city']) ¦¦ strlen($_POST['member_city']) <= 0)
{
echo 'Error: You did not enter your City<br />';
exit();
}
if(!isset($_POST['member_state']) ¦¦ strlen($_POST['member_state']) <= 0)
{
echo 'Error: You did not enter your State<br />';
exit();
}
if(!isset($_POST['member_email']) ¦¦ strlen($_POST['member_email']) <= 0)
{
echo 'Error: You did not enter your Email Address<br />';
exit();
}
if(!isset($_POST['membership']) ¦¦ strlen($_POST['membership']) <= 0)
{
echo 'Error: You did not enter your Membership Level<br />';
exit();
}
{
echo '<b><center>Thank you for our Membership Application is being processed.</center></b><br/><br/>';
}
//send mail.
$to = $_POST['Email'];
$subject = "Thank you for";
$message .= "First Name: " . $_POST['first_name'] . "\n";
$message .= "Last Name: " . $_POST['last_name'] . "\n";
$message .= "Email: " . $_POST['member_email'] . "\n";
$message .= "Joined the blah blah.....\n";
$message .= "Send membership information asap";
if (mail ($to, $subject, $message, 'From: $EMAIL\n')) {
echo 'Again....Thanks for joining.<a href="#">
Back To Message Board</a>';
}
}
?>