title: jQuery AJAX post data gets lost
body: <p>I'm trying to post data with AJAX and insert it into a database table.
  The problem is, half of the data is missing and I don't know why. I have checked all the names of parameters etc. because it seemed I had a typo somewhere (I was missing some characters but I fixed that) but still it won't work.
  Even console.log() and alerts give me the full data I want to post but it never arrives, the php outputs empty parameters. When deactivating the JavaScript or removing "return false;" the php script is opened as expected and works perfectly well, no data is lost (as expected).</p>
  
  <p>Maybe I'm really just missing one single character somewhere ...
  I also tried escaping (escape()) the strings but it didn't change anything.</p>
  
  <p>Here's the code and some logs/alerts/echos</p>
  
  <pre><code>$("#itemspeichern").click(function(){
          setVisible("#item-process");
  
          var itemname = escape($("#itemname").val());
          if ($("#itemneu").is(":checked")) {  
              var itemneu = $("#itemneu").val();
          } else {
              var itemneu = 0;
          }
          var itembild = escape($("#itembild").val());
          var itemkurzb = escape($("#itemkurzb").val());
          var theset = escape($("#theset").val());
  
          console.log("itemname=" + itemname + "&amp;itemneu=" + itemneu + "&amp;itembild=" + itembild + "&amp;itemkurzb=" + itemkurzb + "&amp;theset=" + theset);
  
          $.ajax({
              url: "&lt;?php actualPath(); ?&gt;save-admin-action.php",
              type: "POST",
              data: "itemname=" + itemname + "&amp;itemneu=" + itemneu + "&amp;itembild" + itembild + "&amp;itemkurzb" + itemkurzb + "&amp;theset=" + theset,
              success: function(result){
                  alert("itemname=" + itemname + "&amp;itemneu=" + itemneu + "&amp;itembild=" + itembild + "&amp;itemkurzb=" + itemkurzb + "&amp;theset=" + theset);
                  document.getElementById("item-process").innerHTML = result;
              }
          });
  
          return false;
      });
  </code></pre>
  
  <p>What this does is:
  - output the data of all fields on the console
  - showing all the data in the alert
  but when it is done saving it the database is missing the values of itembild and itemkurzb. Getting the query as response from the php file showed that indeed the parameters are empty for those fields. Here's what I did in php (I shortened it a bit, don't comment on SQL injection and stuff :P)</p>
  
  <pre><code>$ergebnis = mysql_query("INSERT INTO mk7_items(id, de, neu, kurzbeschreibung, bild) VALUES(DEFAULT, '".$_POST["itemname"]."', ".$_POST["itemneu"].", '".$_POST["itemkurzb"]."', '".$_POST["itembild"]."')");
  </code></pre>
  
  <p>the last two fields are empty when I get the response and nothing is saved into the db.
  As I said, setting JS to OFF and running it on php only works perfectly well.</p>
  
  <p>Any ideas? Any stupid mistakes I did there?</p>