firstPHP/checkPOST.php

22 lines
517 B
PHP
Raw Permalink Normal View History

2024-03-18 17:52:16 +03:00
<?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);