title: Update MYSQL with PHP, deletes value instead
body: <p>So, I have the following problem:</p>
  
  <p>I have a table which I fill with the data from my MySQL database and then display on a site. I want to make it so you can change e.g. the description afterwards. Instead what I get right now is that I empty the value.
  I can't see where my code goes wrong, so I'd appreciate some help. :)</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;tbody&gt;
      &lt;?php
          foreach($records as $r) {                       
  
      ?&gt;
          &lt;tr&gt;&lt;?php
              echo "&lt;td&gt;" . "&lt;div class=table-image&gt;" . "&lt;img src=Assets/Images/" . escape($r-&gt;name) . " &lt;/td&gt;". "&lt;/div&gt;";
              ?&gt;
              &lt;td&gt;&lt;div class="data"&gt;&lt;?php echo escape($r-&gt;name); ?&gt;&lt;/div&gt;&lt;/td&gt;
              &lt;td&gt;&lt;div class="data"&gt;&lt;?php echo escape($r-&gt;location); ?&gt;&lt;/div&gt;&lt;/td&gt;
              &lt;td&gt;&lt;div class="data"&gt;&lt;?php echo escape($r-&gt;partners); ?&gt;&lt;/div&gt;&lt;/td&gt;
              &lt;td&gt;&lt;a href="https://goo.gl/maps/S5Drk" target="_blank"&gt;◈ Google Maps&lt;/a&gt;&lt;/td&gt;
              &lt;td class="tDesc"&gt;
                  &lt;div class="desc"&gt;
                      &lt;input class="form-control"  value="&lt;? echo escape($r-&gt;description); ?&gt;" name="description" type="text"&gt;
                  &lt;/div&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;?php echo escape($r-&gt;date); ?&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;form method="post" action="" enctype="multipart/form-data"&gt;
                      &lt;input type="submit" value="&lt;? echo escape($r-&gt;id); ?&gt;" name="delete"&gt;
                  &lt;/form&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;form method="post" action="" enctype="multipart/form-data"&gt;
                      &lt;input type="submit" value="&lt;? echo escape($r-&gt;id); ?&gt;" name="update"&gt;
                  &lt;/form&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;?php
          }
      ?&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>if(isset($_POST['update']) ){
      $des = $_POST['description'];
      $UpdateQuery = "UPDATE repo SET description = '$des', date = NOW() WHERE id ='$_POST[update]' ";          
      mysql_query($UpdateQuery);
  };
  </code></pre>