"; } else if(!preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/',$_POST['yourname'])) { $flag=0; _e("Please Enter Valid Name",'appointment'); echo "
"; } if($_POST['email']=='') { $flag=0; _e("Please Enter E-mail",'appointment'); echo "
"; } else if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['email'])) { $flag=0; _e("Please Enter Valid E-Mail",'appointment'); echo "
"; } if($_POST['message']=='') { $flag=0; _e("Please Enter Message",'appointment'); } if ( empty($_POST) || !wp_verify_nonce($_POST['appointment_name_nonce_field'],'appointment_name_nonce_check') ) { _e('Sorry, your nonce did not verify.','appointment'); exit; } else { if($flag==1) { wp_mail(sanitize_email(get_option("admin_email")),trim($_POST['yourname'])." sent you a message from ".get_option("blogname"),stripslashes(trim($_POST['message'])),"From: ".trim($_POST['yourname'])." <".trim($_POST['email']).">\r\nReply-To:".trim($_POST['email'])); _e("Mail Successfully Sent",'appointment'); } } } ?>