I want to save the data to another table in the database when successfully deleted
Here is my delete.php code
if(isset($_POST["id"]) && !empty($_POST["id"])) {
$sql = "DELETE FROM client_info WHERE id = ?";
if($stmt = mysqli_prepare($conn, $sql)) {
mysqli_stmt_bind_param($stmt, "i", $param_id);
$param_id = trim($_POST["id"]);
if(mysqli_stmt_execute($stmt)) {
}
}
} else {
if(empty(trim($_GET["id"]))) {
}
}