Files
maria_uslugi/verifier_email.php
2026-03-05 10:25:39 +01:00

17 lines
408 B
PHP

<?php
header("Content-Type: text/plain"); // Assure un bon retour texte brut
require_once __DIR__ . '/../includes/bootstrap_global.php';
if (isset($_POST['email'])) {
$email = trim($_POST['email']);
$stmt = $pdo->prepare("SELECT id FROM compte WHERE email = :email");
$stmt->execute(['email' => $email]);
echo($stmt->fetch()) ? "existe" : "disponible";
exit;
}
echo "invalide";
exit;