title: Error when sending html form with POST and jQuery
body: <p>I have this form:</p>
  
  <pre><code>&lt;form id="ereserva"  action="index.php" method="post"&gt;
      &lt;fieldset&gt;
          &lt;label for="id"&gt;ID&lt;/label&gt;
        &lt;input type="id" name="ei" id="eid" readonly class="id text ui-widget-content ui-corner-all"&gt;
        &lt;label for="name"&gt;Nombre&lt;/label&gt;
        &lt;input type="text" name="en" id="ename"  class="name text ui-widget-content ui-corner-all"&gt;
       &lt;/fieldset&gt;
      &lt;input type="submit" tabindex="-1"&gt;   
  &lt;/form&gt;
  </code></pre>
  
  <p>Which I am sending using this: </p>
  
  <pre><code>$.post("edit.php", $("#ereserva").serialize());
  </code></pre>
  
  <p>to a php file that does this: </p>
  
  <pre><code>&lt;?php
  include_once('connection.php');
  $id = $_POST['ei'];        
  $name = $_POST['en'];
  
  if($con-&gt;query("UPDATE reserves SET nom='".$name."' WHERE ID ='".$id."';")=== TRUE)
           printf("alert('success');");
          else
          printf("alert('fail');");
  ?&gt;
  </code></pre>
  
  <p>But the console displays a 500 Internal Server error. </p>
  
  <p>I am afraid I made some mistake with names or id, since I have another different form being sent using the same system and it works perfectly. </p>
  
  <p>Still, I am re-reading all the names and ids and I am not finding any problem...</p>
  
  <p>EDIT: To be more explicit, the log says: </p>
  
  <pre><code>[Sun May 10 09:13:44.971628 2015] [:error] [pid 6737] [client ::1:49874] PHP Notice:  Undefined variable: id in /Library/WebServer/Documents/s$
  </code></pre>
  
  <p>But the variable <code>id</code> arrives to POST from the form name <code>ei</code>, which is a form field that is definitely populated, so I still don't see it very clearly.</p>