include 'db.php'; $email = $_GET['email'] ?? ''; $token = $_GET['token'] ?? ''; if ($email && $token) { // Check if user exists with that token $stmt = $pdo->prepare("SELECT id FROM customers WHERE email = ? AND extra_1 = ?"); $stmt->execute([$email, $token]); if ($stmt->fetch()) { // Update verified status $update = $pdo->prepare("UPDATE customers SET verified = 1, extra_1 = NULL WHERE email = ?"); $update->execute([$email]); echo "

Email Verified!

You can now Login here.

"; } else { echo "

Invalid Link

The verification link has expired or is incorrect.

"; } }