encryptData($email); // تنفيذ التحديث $sql = "UPDATE driver SET email = :email WHERE id = :id"; $stmt = $con->prepare($sql); $success = $stmt->execute([ ":email" => $encryptedEmail, ":id" => $id ]); if ($success && $stmt->rowCount() > 0) { jsonSuccess(null, "Email updated successfully"); } else { jsonError("Failed to update email"); } ?>