<?php
include('connection.php');
if ($_SERVER["REQUEST_METHOD"] === "POST") {
    $platformId = $_POST['platform_id'];

    // Perform the delete operation (Modify as needed)
    $sql = "DELETE FROM add_platform WHERE id = $platformId";

    if (mysqli_query($conn, $sql)) {
        header("Location: add_platform.php"); // Redirect back to the table page after successful delete
        exit();
    } else {
        echo "Error deleting platform: " . mysqli_error($conn);
    }
}
?>
