<?php 
require_once("../adminlogin/include/config.php");
if(!empty($_POST["email"])) {
	$email= $_POST["email"];
	
		$query ="SELECT userEmail FROM users WHERE userEmail='$email'";
		$result = mysqli_query($conn, $query) or die(mysqli_error($conn));
		$count = mysqli_num_rows($result);
if($count>0)
{
echo "<span style='color:#2700ff; font-size:12px;'><strong>Error : Email already exists !</strong></span>";
 echo "<script>$('#submit2').prop('disabled',true);</script>";
} else{
	
	echo "<span style='color:lawngreen; font-size:12px;'> <strong>Email available for Registration !</strong></span>";
 echo "<script>$('#submit2').prop('disabled',false);</script>";
}
}

?>
