firstPHP/checkPOST.php
2024-03-25 18:07:54 +03:00

22 lines
517 B
PHP
Executable File

<?php
$formData = [
"phone" => $_POST['phone'],
"email" => $_POST['email'],
"name" => $_POST['name'],
"lastname" => $_POST['lastname'],
"button" => $_POST['Button'],
"radio1" => $_POST['radio1'],
"textarea" => $_POST['textarea'],
"select" => $_POST['select'],
"one" => $_POST['one'],
"two" => $_POST['two'],
"radio2" => $_POST['radio2'],
"select2" => $_POST['select2']
];
$jsonData = json_encode($formData);
$file = "form.json";
file_put_contents($file, $jsonData);