<?php
include("./include/config.php");

if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['rowId'])) {
    $rowId = $_POST['rowId'];
    $sql = "DELETE FROM `otp` WHERE `id` = $rowId";
    if (mysqli_query($conn, $sql)) {
        echo "success";
    } else {
        echo "error";
    }
}
?>
