The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Trapping and storing Json data Reply To: Trapping and storing Json data


Thanks as ever..

Have got my code looking like the examples you mention and submitted another form to trigger a Json call to the page.

This time “Mickey Mouse” appears in the json_data.txt file but nothing else.

Just to see what happens, I put the fopen statement at the head of the PHP block and inserted these lines to see if the error condition was written to file…

if ($contact == null && json_last_error() !== JSON_ERROR_NONE) {  
    $txt= "Error reading JSON:\n";
  fwrite($myfile, $txt);

The file only contains “Mickey Mouse” which suggests that there was no error condition encountered.