<?php 
include_once('libs/main.php');
$email = $_POST['email_id'];
if($email == ''){
	echo 'Please enter valid email address';
}else{
	if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
   		echo "Invalid email format";
    }else{
		$validateEmailQ = "SELECT * FROM tbl_user WHERE email = '$email' AND status = 1";
		$userList = $conn->execute($validateEmailQ,'select');
		if(isset($userList->id) && $userList->id > 0){
			echo "Email address already exist.";	
		}
	
	}
	
	
}
exit;
?>