mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-04-10 00:45:25 +00:00
test1
This commit is contained in:
parent
1a01adda9c
commit
0d99af0c57
2 changed files with 38 additions and 0 deletions
19
data/process_form.php
Normal file
19
data/process_form.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$data = [
|
||||
'name' => $_POST['name'],
|
||||
'email' => $_POST['email']
|
||||
];
|
||||
|
||||
// Convert the data array to JSON format
|
||||
$json_data = json_encode($data);
|
||||
|
||||
// Specify the path where you want to save the JSON file
|
||||
$file_path = 'userdata.json';
|
||||
|
||||
// Save the JSON data to the file
|
||||
file_put_contents($file_path, $json_data);
|
||||
|
||||
echo "Data saved as JSON successfully.";
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue