title: Jquery ajax parameter is undefined in the PHP script
body: <p>I'm using jQuery Ajax to send parameters to a PHP script. Below is the Jquery ajax script</p>
  
  <pre><code>  jQuery
  &lt;script&gt;
  $(document).ready(function () {
      $("#builder_group").change(function () {
          var selected_builder = $(this).val();
          alert(selected_builder);
          $.ajax({
              type: 'POST',
              url: 'getGroupzCode.php',
              data: 'selected_builder',
              datatype: 'json',
              success: function (data) {
                  // Call this function on success                
                  console.log(data);
                  var yourArray = JSON.parse(data);
                  console.log(yourArray);
                  $.each(yourArray, function (index, yourArray) {
                      $('#builder_group1').append($('&lt;option/&gt;', {
                          value: yourArray.id,
                          text: yourArray.name,
                      }));
                  });
              },
              error: function () {
                  displayDialogBox('Error', err.toString());
              }
          });
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>When I see in firebug console I see the parametr passed is correct as selected but in the PHP script I see undefined index</p>
  
  <pre><code>PHP
      $builder_id=$_POST['selected_builder'];
      error_log($builder_id);
  </code></pre>