<?php
include("includes/site_info.php");

 if(isset($_REQUEST['check_id'])){
 $check_id = $_REQUEST['check_id']; 
 $check_value = $_REQUEST['check_value'];
if($check_id=="CheckMail") { 
    
        if(get_magic_quotes_gpc()) { 
            $email = $check_value; 
        }else{ 
            $email = addslashes($check_value); 
        } 
		if(empty( $email ) ||!ereg( "^[-a-zA-Z0-9_\\.]+\\@([0-9A-Za-z][0-9A-Za-z-]+\\.)+[A-Za-z]{2,5}\$", $email)){
			echo "Invalid Email";
		}
		else if(strlen($email)<5){
			echo "Limit to 5 characters and above.";
		}
		else{ ?>

<font color='Green'><?php echo "This Email address is available."; ?></font>
<?php 
        } 
      } 
} else { 
	echo 'Error, Can\'t be blank!'; 
}

?>
