include($_SERVER['DOCUMENT_ROOT'].'/inc.config.php'); include('class.mailer.php'); require("class.inputfilter.php"); include('functions.php'); $errors = array(); //this array will store which inputs could not validate //therefore $inputs_with_errors['title'] = "sometext" means the //title was invalid. $email_sent = FALSE; if( isset($_POST['fm-submit']) ) { //process form and send mail if all is good if( check_Form($errors) ) { $email = new mailer('lc@scacdc.net','Communitydevelopmentsc.org-Mailer','Website Contact Us Form'); $email->setBody( createBody() ); $email->send(); $email_sent = TRUE; } } '?> Contact Us - About Us - South Carolina Association of Community Development Corporations (SCACDC)

Contact Us

Your message has been sent. Thank you for your interest in the South Carolina Association of Community Development Corporations.

(I want to send another message)

Mailing Address
658 Rutledge Avenue - Second Floor
Charleston, SC 29403
Telephone
843.579.9855
Fax
843.579.0232

Use the form below to send us a question or comment.
(*) means required field

Contact Form
/** * validates the form * * @param Array $errors The array which will hold any error messages * @returns Boolean */ function check_Form(&$errors) { //comments required //for users sake, check validity of email address and phone number if entered //clean input $myFilter = new InputFilter(); $_POST = $myFilter->process($_POST); $valid = true; //phone number (only validate if something was entered) $_POST['fm-phone'] = trim($_POST['fm-phone']); if( !empty($_POST['fm-phone']) ) { if( validate_USphone($_POST['fm-phone']) == false ) { $errors[] = array('id'=>'fm-phone','error'=>'Invalid phone number. Use format 555-555-5555' . "\n" . '(Note: Phone Number can be left blank)'); $valid = false; } } //email address (only validate if something was entered) $_POST['fm-email'] = trim($_POST['fm-email']); if( !empty($_POST['fm-email']) ) { if( validate_email($_POST['fm-email']) == false ) { $errors[] = array('id'=>'fm-email','error'=>'Invalid Email. Please re-enter.' . "\n" . '(Note: Email can be left blank)'); $valid = false; } } //name $_POST['fm-name'] = trim($_POST['fm-name']); if( empty($_POST['fm-name']) ) { $valid = FALSE; $errors[] = array('id'=>'fm-name','error'=>'Name'); } //comments $_POST['fm-comments'] = trim($_POST['fm-comments']); if( empty($_POST['fm-comments']) ) { $valid = FALSE; $errors[] = array('id'=>'fm-comments','error'=>'Comments'); } return $valid; } /** * Creates the email body using the form fields * * @returns String; */ function createBody() { $body = ''; //name $body .= 'Name: '; $body .= (empty($_POST['fm-name'])) ? 'NA' : $_POST['fm-name']; $body .= "\n\n"; //contact $body .= 'Phone Number: '; $body .= (empty($_POST['fm-phone'])) ? 'NA' : $_POST['fm-phone']; $body .= "\n" . 'Email: '; $body .= ( empty($_POST['fm-email']) ) ? 'NA' : $_POST['fm-email']; $body .= "\n\n"; //comments $body .= 'Comments: ' . "\n"; $body .= '------------------------------------------'."\n"; $body .= ( empty($_POST['fm-comments']) ) ? 'NA' : $_POST['fm-comments']; $body .= "\n".'------------------------------------------'."\n\n"; $body .= 'END OF SUBMISSION'; return $body; } //end function /** * Strips leading and trailing spaces, then checks if the field is empty * * @author John Barrieros * @since 9/1/2004 * @param String $field_value The field being checked * @param Array $errors The array to hold the error messages * @param String $field_name The name of the field. * @return Boolean (True if field is empty, False if field is not empty) */ function fieldEmpty( &$field_value, &$errors, $field_name ) { $empty = false; $field_value = tidy($field_value); if( empty($field_value) ) { $errors[] = $field_name; $empty = true; } return $empty; } '?>eld_value) ) { $errors[] = $field_name; $empty = true; } return $empty; } ?> } ?>