<?php
// Include your database connection code here
include("connection.php");

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // Get the record ID to delete
    $recordId = $_POST['record_id'];

    // Perform the deletion query (change 'your_table_name' to your actual table name)
    $deleteQuery = "DELETE FROM add_website WHERE id = $recordId";

    if (mysqli_query($conn, $deleteQuery)) {
        // Deletion was successful
        echo 'success';
    } else {
        // Deletion failed
        echo 'error';
    }
}
?>