title: How do I use HTML & PHP forms to insert data into a database?
body: <p>So I am actually not sure what I am doing wrong, and I am sure it is just some small mistake, but I can't seem to get the submit button to take the information in the form and and send it to the database. </p>
  
  <p>Here is what my code looks like. </p>
  
  <p>So with this I am able to successfully connect to the database:</p>
  
  <pre><code>&lt;?php
  
  $mysql_host = 'localhost';
  $mysql_pass = '';
  $mysql_user = 'root';``
  
  $mysql_db = 'blog';
  
  if (! @mysql_connect($mysql_host, $mysql_user, $mysql_pass) || ! @mysql_select_db($mysql_db)){
  die('Error');
  }
  
  ?&gt;
  </code></pre>
  
  <p>and I able to see the contents of table by printing them to the screen. </p>
  
  <p>I believe the problem is here in this simple html form:</p>
  
  <pre><code>            &lt;form action="index.php" method = "post"&gt;
  
  
              &lt;div class="ui form"&gt;
                  &lt;div class="field" name = "title"&gt;
                 &lt;label&gt;Title&lt;/label&gt;
                  &lt;input type="text"&gt;
              &lt;/div&gt;
                &lt;div class="field" name = "post"&gt;
                  &lt;label&gt;New Post&lt;/label&gt;
                  &lt;textarea&gt;&lt;/textarea&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;br&gt;
              &lt;div class="ui submit button" name = "submit"&gt;Submit New Post&lt;/div&gt;
  
  
          &lt;/form&gt;
  </code></pre>
  
  <p>I am just curious as to which php code I should use to connect this form so I am able to send the contents of the form over to the database. </p>