<?php
include("connect.php");
include("connectp.php");

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $email = $_POST['email'];
    /* $email = 'at.zeelsheth@gmail.com'; */
    
    // Perform a database query to check if the email exists
    $query = "SELECT COUNT(*) AS count FROM res_user_master WHERE uemail = :email";
    $stmt = $db7->prepare($query);
    $stmt->bindParam(':email', $email);
    $stmt->execute();
    $result = $stmt->fetch();
    $count = $result['count'];
    
    if ($count > 0) {
        echo 'exists';
    } else {
        echo 'unique';
    }
}
?>
