I the objective of the code that I attached this note is to
Collect data in a form.
Post to a PHP file where the collected information is turned into a JSON
Write the JSON information to a file
Return the JSON and print it to the an ID in the HTML
All of the above works except step 4 and I can seem to find the error. I hope some on will take a look and tell me where I have gone astray.