<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $id = $_POST['id'];
    $action = $_POST['action'];

    // Perform different actions based on the button clicked
    switch ($action) {
        case 'action1':
            // Handle action 1
            echo "Action 1 performed for ID: $id";
            break;
        case 'action2':
            // Handle action 2
            echo "Action 2 performed for ID: $id";
            break;
        case 'action3':
            // Handle action 3
            echo "Action 3 performed for ID: $id";
            break;
        default:
            echo "Invalid action.";
    }
} else {
    echo "Invalid request method.";
}
?>
