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

$monthSelect = mysqli_real_escape_string($conn, $_REQUEST['monthSelect']);

$q = mysqli_query($conn, "DELETE FROM `m1` WHERE `Month` = '$monthSelect'");

if ($q && mysqli_affected_rows($conn) > 0) {
    echo "success";
} else {
    error_log("Delete error or no rows deleted: " . mysqli_error($conn));
    echo "fail";
}
?>
