title: Can't retrieve POST data sent from AJAX, undefined index php
body: <p>This is my ajax form which works, </p>
  
  <pre><code>$.ajax({
  type: "POST",
  url: "update_coordinate.php",
  data: 
  'id=' +$id+
  'name=' +$name+
  'wname=' +$wname+
  'xcor=' +$xcor+
  'ycor=' +$ycor+
  'xwid=' +$xwid+
  'yhei=' +$yhei+
  'photo=' +$photo+
  'targeturl=' +$targeturl,
  success: function(data){
  alert(
  ' id:' +$id+
  ' name:' +$name+
  ' wname:' +$wname+
  ' xcor:' +$xcor+
  ' ycor:' +$ycor+
  ' xwid:' +$xwid+
  ' yhei:' +$yhei+
  ' photo:' +$photo+
  ' targeturl:' +$targeturl
  );
  alert(data);
  }
  });
  </code></pre>
  
  <p>the alert shows all of the data, the problem is the php side which doesn't seem to read the value, I'm not sure if I am missing something. </p>
  
  <p><strong>This is interesting: While messing around, I somehow got the entire concatenated string to be entered in the name field with the equals sign included... how could that have happened?</strong></p>
  
  <p>I took out the if(post) argument which is used when submitting an html form to the same page with method post and a submit button. I don't know if that is bad. </p>
  
  <p>I tried both of these </p>
  
  <pre><code>if(isset($_POST['id'])){
   $id = $_POST['id'];
   }else {
   $id = "";
   }
  
   $name = $_POST['name'];
  </code></pre>
  
  <p>Getting errors Undefined index: name which the rest are fine because I specify an arbitrary string value of empty</p>
  
  <p>What am I missing? </p>