<?php
require_once "../database.php";

$stmt = $con->prepare('SELECT email FROM users WHERE email = ?');
$stmt->bind_param('s', $_POST['email']);
$stmt->execute();
$stmt->store_result();
if ($stmt->num_rows > 0) {
    echo "ok";
} else {
    echo "error";
}

$stmt->close();
