title: PHP update MySQL by id not name
body: <p>PHP uses the name from a form to update a record in a MySQL database, I want to update it using the <code>id</code> not the <code>name</code> like that:</p>
  
  <pre><code>&lt;form action="myfile.php" method="post"&gt;
      &lt;input type="text" name="nametextbox" id="username"/&gt;
      &lt;input type="text" name="emailtextbox" id="email"/&gt;
      &lt;input type="submit" name="button" id="update"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><code>myfile.php</code> >>(if I used the name)</p>
  
  <pre><code>if (isset($_POST['button'])){
      $title=$_POST['nametextbox'];
      $body=$_POST['emailtextbox'];
      mysql_connect("x", "y", "z")or die (mysql_error());
      mysql_select_db('c')or die (mysql_error());
      mysql_query("UPDATE table_name SET title='$title', body='$body' WHERE `id`='$_GET[update]'");
      mysql_close();
      header("location:mawdoo3.php");
  }
  </code></pre>
  
  <p>How do I used the <code>id</code> and not the <code>name</code>?</p>