title: PHP and SQL code wont add anything into MySQL database
body: <p>I am trying to create a form that will take a title, block of text, student ID and add it to a database when the submit button is pressed.</p>
  
  <p>The <code>student_ID</code> is kept the same for simplicity and will be changed later in the project.</p>
  
  <p>The HTML and PHP are in the same file.</p>
  
  <p>My code doesn't add anything to the database.</p>
  
  <p>PHP
      
      
      </p>
  
  <pre><code>&lt;?php
    if($_POST["submit_button"]){
  
      //here is the title and text that will be added to the database by the user
      $title=$_POST["testimonial_title"];
      $text=$_POST["testimonial_text"];
  
      //create the sql statement 
      $sql="INSERT INTO testimonials 
      (testimonial_title, testimonial_text, student_ID)
      VALUES(
        '$title',
        '$text',
      1);"; //the student_ID is a foreign key and for simplicity I kept it at 1
  
      $result = mysqli_query($con,$sql);
  
      mysqli_close($con);
    }
  ?&gt;
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>  &lt;&lt;!--Page Content-- &gt;
    &lt;h1 class="page-header"&gt;
      Learning Journals&lt;small&gt;- Admin&lt;/small&gt;
    &lt;/h1&gt;
  
    &lt;h3&gt; 
      Update Learning Journals Plans 
    &lt;/h3&gt;
  
    &lt;form name = "membership_form" 
      action = ""
      id = "contactForm"
      method = "post"&gt;
  
      &lt;label&gt;Learning Journals Title:&lt;/label&gt;&lt;br/&gt;
      &lt;input type="text" name="testimonial_title" /&gt;&lt;br/&gt;
      &lt;label&gt;Learning Journal:&lt;/label&gt;&lt;br/&gt;
      &lt;textarea rows="10" cols="100" name="testimonial_text" 
        maxlength="999" style="resize:none"&gt;&lt;/textarea&gt;
      &lt;button type="submit" name ="submit_button" class="btn btn-primary"&gt;
        Update
      &lt;/button&gt;
    &lt;/form&gt;
    &lt;hr/&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>