|
|
|
CID
> Submit or Change a Listing |
||
|
$errors=0;
if (isset($_POST['Submit']) && $_POST['Submit'] == "Submit") {
$number = $_POST['number'];
if(md5($number) != $_SESSION['image_value']) {
$error_message = "Validation string not valid! Please try again!";
}
else if(!(eregi("^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$",$_POST['email']))) {
$error_message = "The email address '".$_POST['email']."' does not seem to be valid. Your message could not be sent. Please go back and try again."; } else { // BOF sanitize input $_POST['email'] = preg_replace( "/\n/", " ", $_POST['email'] ); $_POST['name'] = preg_replace( "/\n/", " ", $_POST['name'] ); $_POST['email'] = preg_replace( "/\r/", " ", $_POST['email'] ); $_POST['name'] = preg_replace( "/\r/", " ", $_POST['name'] ); $_POST['email'] = str_replace("Content-Type:","",$_POST['email']); $_POST['name'] = str_replace("Content-Type:","",$_POST['name']); // EOF sanitize input $email = $_POST['email']; $name = $_POST['name']; $message = $_POST['message']; $today = date("M d, Y"); ////////////////////////////////////////////// // Insert your email address for recipient $recipient = "churchsearch@canadianchristianity.com"; ///////////////////////////////////////////// // Insert message you wish to show in subject of the email $subject = "CID Submission Form"; $forminfo = "Status: $Status\n Organization Name: $Organization\n Category: $Category\n Ministry type: $BusMin\n School Grades: $Grades\n Camp location: $Camp\n Address: $Address\n City: $City\n Province: $Province\n Zip: $Zip\n Phone #: $Phone\n Fax #: $Fax\n Toll Free #: $Toll\n Province: $Province\n Email: $email\n Website: $Website\n Affiliation: $Affiliation\n Comments: $Comments\n Form Submitted: $today\n\n"; $formsend = mail("$recipient", "$subject", "$forminfo", "From: $email\r\nReply-to:$email"); } } if(isset($_POST['Submit'])) { if(!empty($error_message)) { ?> Submission Form Submission Form Thank you for your submission. The listing has been forwarded to an administrator and will be added to the directory once approved. echo nl2br($forminfo); ?> Please fill out the form and click submit. All fields are required. |
||