title: ajax post not sending data
body: <p>UPDATE: I Figured it out. Was a URL issue, which redirected and cleared the POST before it was sent to the server. </p>
  
  <pre><code>$('#addbtn').on('click',function() {
  
  $.ajax({
    type: "POST",
    url: "/create/",
    dataType: "json",
    data: $('#MultiAdd').serializeArray(),
    success: function (data) {
      // this returns Failed. Please Try Again. c_name=
      // c_name should equal the value from post. 
      alert(data.msg)
    },
    error: function (xhr, ajaxOptions, thrownError) {}
   });
  
  });
  </code></pre>
  
  <p>I can not seem to get this to post the data. Ive tried so many variations. Looking at this for hours trying to see whats wrong. </p>
  
  <p>I have tried <code>data: {test:'test'}</code> (did not work)</p>
  
  <p>the GET function does, but I need this to be POST. 
  I have also tried normal .serialize(). Still didnt work. </p>
  
  <p>This does work to show me the values. but ajax will not POST them in the submission. </p>
  
  <pre><code>console.log($('#MultiAdd').serializeArray());
  </code></pre>
  
  <p>(on the page, the form and ajax codes are dynamically added, but I dont think that would change much, Ive tested that already.) </p>
  
  <p>Update: (i'm using codeigniter) - Server-side. Trying to access the [input name="c_name"]</p>
  
  <pre><code>public function create()
  {
     $value = $this-&gt;input-&gt;post('c_name');
  
     $msg = array("msg"=&gt;"Failed. Please Try Again. c_name=".$value); 
  
     die(json_encode($msg)); 
   }
  </code></pre>