Firefox error 'no element found'
Firefox is expecting to get something it can parse as XML back, and throwing an XML parsing error when it gets an empty response.
Before your PHP calls "exit()", use
header('Content-Type: text/plain');
and Firefox will not try to parse the response as XML, and there should be no error.
You should have your php return a valid HTTP response, because Firefox will try to read it even if you don't do anything with it. So return at least a valid header
header("HTTP/1.0 200");exit();