Parsing a php into json

When the form is submitted the content of the form is passed to the script identified by the action attribute on the form tag. All of the content are passed in the $_POST array with their names coming from the name attributes on the individual form fields. If you want to convert the form to JSON you would need to do that after the script has read the values into $_POST.