<!DOCTYPE html>
<html>
<head>
    <title>Display POST Data</title>
</head>
<body>

<button onclick="showPOSTData()">Show POST Data</button>

<script>
function showPOSTData() {
    // Get the POST data from a variable (you need to set this variable with the data)
    var postData = <?php echo json_encode($_POST); ?>;

    // Convert the POST data to a formatted string
    var postDataString = JSON.stringify(postData, null, 2);

    // Display the POST data in an alert
    alert(postDataString);
}
</script>

</body>
</html>
