I am getting SyntaxError:JSON.parse in the ajax error function and when trying to validate via json validator, it says that the header was undefined and was expecting {,[ Is my header code incorrect? Many thanks
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
header("Cache-Control: no-cache, must-revalidate" );
header("Pragma: no-cache" );
header("Content-type: application/json");
$json = "";
$json .= "{\n";
$json .= "\"company\": \"".$company."\",\n";
$json .= "\"box\": \"".$box."\",\n";
$json .= "\"dept\": \"".$dept."\",\n";
$json .= "\"submit\": \"".$submit."\",\n";
$json .= "\"service\": \"".$service."\",\n";
$json .= "\"address\": \"".$address."\",\n";
$json .= "\"authorised\": \"".$authorised."\"\n";
$json .= "}\n";
echo $json;