I've simplified it quite a bit but it's still not working.
PHP:
<?php
$a = array('data' => 'Hello');
echo json_encode($a);
?>
Here's the JQuery Code:
function getCityAndState(data, location)
{
var jsonString = {"zipCode": data};
var outR = outputResults
alert("JSON String:" + jsonString.zipCode);
if (location === "living")
{
$("#livingCityField").val("");
$("#livingStateField").val("");
alert("Inside getCityAndState: " + location);
//$.get("testfile.php",
// {zipCode: data},
// outR,
// 'text'
// );
$.getJSON("testfile.php",function(d) {
alert("JSON Data: " + d.data);
});
}
The really relevant part of this code is the $.getJSON part.