title: Edit Mysql Table With A Form
body: <p>I want to edit mysql data using a contact form. When the user clicks edit on the specific post they want to change, it takes them to a form that has the post values in the input fields, and they can change whatever they want about the post. I already have this part working but now I need the change to actually take effect once the user clicks submit. How can I accomplish this?</p>
  
  <p>Here is the PHP that displays all the text from the blog post in mysql into the input fields when the user clicks edit.</p>
  
  <pre><code>&lt;?php
          include "../php/db_connect.php";
  
          if (isset($_GET['id'])) {
  
              $id = $_GET['id'];
  
              $sql = mysql_query("SELECT * FROM articles WHERE id='$id'");
              while($row = mysql_fetch_array($sql)) {
                  $id = $row['id'];
                  $title = $row['title'];
                  $content = $row['content'];
                  $written_by = $row['written_by'];
                  $category = $row['category'];
              }
  
          ?&gt;
  
      &lt;div class="content_wrapper"&gt;
          &lt;h1 class="content_heading"&gt;Edit A Blog Post&lt;/h1&gt;
          &lt;form method="post" action="php/edit_article_process.php" enctype="multipart/form-data" id="upload_article_form"&gt;
              &lt;span&gt;Title&lt;/span&gt;
              &lt;input type="text" name="title" class="input" value="&lt;?php echo $title; ?&gt;"/&gt;
              &lt;span&gt;Article&lt;/span&gt;
              &lt;textarea rows="20" name="ckeditor1" class="input" style="resize:none;"&gt;&lt;?php echo $content ?&gt;&lt;/textarea&gt;
              &lt;span&gt;Author&lt;/span&gt;
              &lt;input type="text" name="written_by" class="input short_input"  value="&lt;?php echo $written_by; ?&gt;"/&gt;
              &lt;span&gt;Category - &lt;i&gt;Spell it right nigga&lt;/i&gt;&lt;/li&gt;&lt;/span&gt;
              &lt;input type="text" name="category" class="input short_input"  value="&lt;?php echo $category?&gt;"/&gt;
              &lt;input type="submit" name="update" class="input submit_button"/&gt;
          &lt;/form&gt;
  
          &lt;?php } ?&gt;
  
      &lt;/div&gt;
  </code></pre>
  
  <p>Now all I need is for the change to take effect when the user clicks submit.</p>