Update send-post-form-by-js/test.php

This commit is contained in:
Ivor Barhansky 2024-05-10 09:43:04 +00:00
parent 9154eea9c3
commit 8d3bf0c320

View File

@ -1,7 +1,6 @@
<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') var_dump($_POST);
<?= var_export($_POST, true) ?>
echo <<<HTML
<button onclick="sendPostWithData('test.php', {name: 'John', surname: 'Doe'})">Send</button>
<script src="script.js"></script>
HTML;
<button onclick="sendPostWithData('test.php', {name: 'John', surname: 'Doe'})">Send</button>
<script src="script.js"></script>