title: jEditable is taking only one id
body: <p>Alright. I'm new to jEditable. Let me explain the issue i'm having with jEditable.</p>
  
  <p>I have this simple table in my database -</p>
  
  <pre><code>id  car        make 
  1   panamera   porsche  
  2   italia     ferraris 
  3   avantador  lamborghini  
  4   slk        mercedes
  </code></pre>
  
  <p>And i'm gonna echo this table in a while loop and below is the code -</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  &lt;?php
  $query2 = "SELECT * FROM inplace LIMIT 0, 6";    
  $result2 = mysql_query($query2) or die ('Query couldn\'t be executed');  
  $row2 = mysql_fetch_assoc($result2);
  ?&gt;
  
  $(function() {
  $(".items").editable("handler.php", { 
  submitdata : {userid: "&lt;?php echo $row2['id']; ?&gt;"},
  indicator : "&lt;img src='img/indicator.gif'&gt;",
  tooltip   : "Doubleclick to edit...",
  event     : "click",
  onblur    : "submit",
  name : 'newvalue',
  id   : 'elementid',
  
  }); 
  });
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;ul&gt;
  &lt;?php  
  $query = "SELECT * FROM inplace LIMIT 0, 6";    
  $result = mysql_query($query) or die ('Query couldn\'t be executed');  
  while ($row = mysql_fetch_assoc($result)) {
  
  echo '&lt;li class="items" id="car"&gt;'.$row['car'].'&lt;/li&gt;';
  echo '&lt;li class="items" id="make"&gt;'.$row['make'].'&lt;/li&gt;'; 
  }
  
  ?&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>In the above code, i'm passing <code>newvalue</code>(user edited) and <code>elementid</code>(car or make) in the jeditable script. And i also need one more identifier which helps identify the correct database id to update. So i'm trying to pass the database id in <code>submitdata : {userid: "&lt;?php echo $row2['id']; ?&gt;"}</code>. I'm not sure if that method is correct.</p>
  
  <p>And below is the update query in "handler.php" file -</p>
  
  <pre><code>require("db.php");
  
  function fail($msg) {
  header('HTTP/1.0 404 Not Found');
  die($msg);
  }
  
  $id = (int)@$_POST['userid'];
  
  $field = @$_POST['elementid'];
  
  $allowed_fields = array('car','make');
  if (!in_array($field, $allowed_fields)) fail('Invalid or missing field.', 404);
  $newvalue =  $_POST['newvalue'];
  $query = "UPDATE inplace SET `$field`='$newvalue' WHERE id=$id"; 
  $result = mysql_query($query);
  echo $newvalue;
  </code></pre>
  
  <p>So the issue here is, this <code>submitdata : {userid: "&lt;?php echo $row2['id']; ?&gt;"}</code> is passing only 1st id. That means its passing only one id. So even if you edit <code>italia</code> or <code>avantador</code> which belongs to ids 2 and 3 respectively, it updates 1st id. When i echo the query, whichever car you edit, it always reads as <code>UPDATE inplace SETcar='volante' WHERE id=1</code>. When i directly write 2 or 3 or 4 in the submitdata, it updates correctly. Its passing only one id. Someone suggested me to use like <code>id="car-'.$row['id'].'"</code> and then explode it and then use foo and stuff. I tried using it but didnt work for me. Looking for a solution for this.</p>