diff --git a/data/process_form.php b/data/process_form.php new file mode 100644 index 0000000..4351854 --- /dev/null +++ b/data/process_form.php @@ -0,0 +1,19 @@ + $_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."; +} +?> \ No newline at end of file diff --git a/data/test1.html b/data/test1.html new file mode 100644 index 0000000..13db39d --- /dev/null +++ b/data/test1.html @@ -0,0 +1,19 @@ + + + + Save Form Data to JSON + + +

Save Form Data to JSON

+ +
+ +
+ + +
+ + +
+ + \ No newline at end of file