title: Undefined parameter when returning data from jQuery.post to PHP
body: <p>I am trying to return data from a database and populate a text field after the user enters an ID in the first text box. Currently I had the code working as long as the user did not enter a space in the ID number. Now I am attempting to allow that use case. My PHP code returns a json encoded array with three fields: first_name, last_name, and full_name.</p>
  
  <p>When I use console.log(data) to view the data being returned I receive the following:</p>
  
  <pre><code>    {"first_name":"Test","last_name":"Test","full_name":"Test Test"} 
  </code></pre>
  
  <p>However in my code, I try to write <em>data.full_name</em> in a .val() nothing is populated, and when use the console.log I get an error saying "undefined".</p>
  
  <p>Here is the whole jQuery Code:</p>
  
  <pre><code>    $("#ID").blur(function () {
          var params = {};
          params.ID = encodeURIComponent($(this).val());
          $.post("getter.php", params, function ( data ) {
            if (!data) {
               $("input[name=username]").val("User Not Found");
            } else {
               $("input[name=username]").val(data.full_name);
               $("input[name=username]").attr("readonly", true);
            }
          });
       });
  </code></pre>
  
  <p>Any help you can offer would be much appreciated.</p>