Asterisks (*) indicate required information.'; if( $_POST['cmd'] == 'do_submit' ) { $subject = '[Nextaphile.com] Message from the Contact page.'; // recipients $recipients = 'martin@thr5.com'; $bcc_recipients = ''; // Clean up formdata $cmd = $_POST['cmd']; $fullname = ucwords(strtolower(trim($_POST['fullname']))); $email = strtolower(trim($_POST['email'])); $phone = trim($_POST['phone']); $message = trim($_POST['message']); if( !$fullname || $fullname=='' ) { $msg = '
Error: Please enter your Name.
'; header( "Location: index.htm?showfrm=true&fullname=$fullname&email=$email&message=$message&msg=".urlencode($msg) ); exit; } else if( !$email || $email=='' ) { $msg = '
Error: Please enter your Email Address.
'; header( "Location: index.htm?showfrm=true&fullname=$fullname&email=$email&message=$message&msg=".urlencode($msg) ); exit; } else if( !preg_match("/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)*\.([a-zA-Z]{2,6})$/", $email) ) { $msg = '
Error: Invalid Email Address Format.
'; header( "Location: index.htm?showfrm=true&fullname=$fullname&email=$email&clientname=$clientname&msg=".urlencode($msg) ); exit; } else if( preg_match('#((?:(?!).)*)#i', $message) ) { $msg = '
Error: No HTML allowed. Please try again.
'; header( "Location: index.htm?showfrm=true&fullname=$fullname&email=$email&message=$message&msg=".urlencode($msg) ); exit; } else { $message = strip_html_tags($message); // Email headers $email_headers = 'From: ' . $email . "\r\n"; $email_headers .= 'Return-Path: ' . $email . "\r\n"; $email_headers .= 'Reply-To: ' . $email . "\r\n"; if( $bcc_recipients ) $email_headers .= 'Bcc: ' . $bcc_recipients . "\r\n"; // Email datetime $now = time(); $date = date( 'm/d/Y H:i:s', $now ); putenv( "TZ=America/Los_Angeles" ); $msg1 = "The following message (re: $subject) was received from the Bluwater Crossing website on $date.\n\n"; $msg1 .= "Full Name: $fullname\n"; $msg1 .= "Email: $email \n\n"; $msg1 .= "Phone: $phone\n"; $msg1 .= "Message: $message\n"; $msg1 .= "\n\n"; mail( $recipients, "$subject", $msg1, $email_headers ); //Thankyou page $msg = '
Thank you for your Message!
'; header( 'Location: index.htm?showfrm=true&msg='.urlencode($msg) ); exit; } } ?> Contact Me | Nextaphile

Contact Me

Email me here, if you’d like!

Full Name *
Email *
Message *