Location: PHPKode > scripts > Orochimu contact > check.php
<?php
/**
 * Orochimu - contact script 1.0
 * **************************
 * Written by Orochimu
 * **************************
 * http://orochimu.web-pro.hu
 * **************************
 * You can contact me at hide@address.com
 * **************************
 * You can use, modify, and redistribute this script.   
 */

require_once("config.php");

function m_v($e){    
   	if(preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/', $e)){
   	    return true;
    }
    else{
        return false;
    }
 
}

if(isset($_POST['s_y'])
and
$_POST['s_y']=="1"
and
isset($_POST['name'])
and
strlen($_POST['name'])>2
and
isset($_POST['message'])
and
strlen($_POST['message'])>5
and
m_v($_POST['email'])==true){    
    
    $s_n = htmlspecialchars($_POST['name'], ENT_QUOTES); 
    $g_m = $email;
    $s_m = htmlspecialchars($_POST['email'], ENT_QUOTES);
    $m   = htmlspecialchars($_POST['message'], ENT_QUOTES);
    $m   = preg_replace('/\n{4,}/', str_repeat('<br />', 2), $m);
    $m   = preg_replace('/\n/', '<br />', $m);
    $s   = $subject;
    $h   = 'MIME-Version: 1.0' . "\r\n";
    $h  .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";    
    $h .= "From: ". $s_n . " <" . $s_m . ">\r\n";
    
    if(mail($g_m,$s,$m,$h)){
        echo "ok"; 
    }
        
    
    
    
}

?>
Return current item: Orochimu contact