<?php
include('connection.php');

if(isset($_GET['delete'])) {
    $id_to_delete = $_GET['delete'];
    
    // Perform the delete operation here, e.g., using a SQL DELETE statement
    $delete_sql = "DELETE FROM add_service WHERE id = $id_to_delete";
    
    if (mysqli_query($conn, $delete_sql)) {
        // Deleted successfully
        echo "Record deleted successfully.";
    } else {
        // Handle the error if the delete operation fails
        echo "Error: " . mysqli_error($conn);
    }
}

// Redirect back to the main page or wherever you want
header("Location: add_service.php");
?>