Contatct Mission:Enterprise

"); $sql_titles = "SELECT Abbrev FROM list_states ORDER BY Rank"; $res_titles = mysql_query($sql_titles) or die('\$sql_titles query failed: ' . mysql_error()); while ($row = mysql_fetch_array($res_titles)) { $Abbrev[] = $row[0]; } if (!$initial) { print ("

Entry Required *

"); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print ("
Your Name *
Organization *
State  
Country  
Email *
Preferred Phone 
Comment  
   
"); } else { // print_r($_POST); $fail = "No"; $no_email = "No"; if (!$Name || $Organization || !$Email) { if (!$Name) { print ("

Please provide your first name.

"); } if (!$Organization) { print ("

Please provide your organization affiliation, if a business person, indicate a status.

"); } if (!$Email) { print ("

Please provide your email address.

"); $no_email = "Yes"; } $fail = "Yes"; } // now check email address syntax //Check for a @ in the email address if ($no_email == "No") { $email_ats = substr_count($Email, '@'); $email_dots = substr_count($Email, '.'); if ($email_ats > 0 && $email_dots > 0) { $email_at_ = strpos($Email,"@"); //Check for a dot in the email address after the first @ $email_dot = strpos($Email,".",$email_at+2); } // test if ($email_at_ < 1 || $email_dot < $email_at_ || $email_ats > 1) { print("

The email address "$Email" appears to be invalid.
Please correct the email field with an appropriate email address.
"); $fail = "Yes"; } // if ($email_at_ < 1 || $email_dot < $email_at_ || $email_ats > 1) } if ($fail == "Yes") { print ("

Entry Required *

"); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print ("
Your Name *
Organization *
State  
Country  
Email *
Preferred Phone 
Comment  
   
"); } else { print ("

Thank you for your registration for the Mission:Enterprise consultation

"); print (""); print (""); print (""); print (""); print (""); print (""); print (""); if ($Comment) { $Comment_Display = stripslashes(nl2br($Comment)); print (""); } print ("
Name  $Name
Organization  $Organization
State  $State
Country  $Country
Email  $Email
Preferred Phone $Phone
Comment  $Comment_Display

A confirmation email has been sent to $Email"); $date_today = date("Y-m-d"); // captures current date $sql_ins = "INSERT INTO `list_contact` (`Title`, `Name`, `Organization`, `State`, `Country`, `Email`, `Phone`, `Comment`, `Date_Entered`) VALUES ('$Name', '$Organization', '$State', '$Country', '$Email', '$Phone', '$Comment', '$date_today')"; $res_ins = mysql_query($sql_ins) or die('Query $sql_ins failed: ' . mysql_error()); // now send email // mail lines $mailto = "enterprise@finishers.org"; $subj = "Mission:Enterprise Website Message"; $headers .= "FROM: $Email\r\n"; if ($ccemail) { $headers .= "CC: $Email\r\n"; } if ($bccemail) { $headers .= "BCC: $bccemail\r\n"; } // echo "
\$from=$from
\$headers=$headers
"; $message = " Thank you for your note to Mission:Enterprise You wrote: $Name $Organization $State $Email $Phone $Comment "; mail("$mailto", "$subj", $message,"$headers" . "X-Mailer: PHP/" . phpversion()); } // else if ($fail == "Yes") } // else if (!$initial) { ?>