I am using an AJAX call with Jquery to a PHP form:
$.ajax({
type : 'POST',
url : 'submit_form.php',
dataType : 'json',
data: dataString ,
which encodes the results from the database using:
echo json_encode($results);
However it prints the data back to at the top of the page that made the AJAX call, this completely breaks functionality in IE because it returns the text string before <html> declaration.
{"status":false,"msg":"Sorry The Queue is full"}<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
Is there anyway I can suppress this echo function on the page but still return the data array back to my page so I can use the results like ( data.msg )