title: wordpress form insert data into database
body: <p>I built a form inside a wordpress page and I want it to send the inputted data into custom build tables in my wp database. I am able to get specified in code data to insert but I cannot figure how to get my code to take in the data. I have tried putting the code inside the page and outside in the main WP folder and still I can't get anything to work.</p>
  
  <p>My form</p>
  
  <pre><code>&lt;form  method="post" action="setLiquor.php"&gt;
  Add a New Liquor Type&lt;/br&gt;&lt;/br&gt;
  &lt;p&gt;Name: &lt;input type="text" name="name"/&gt;&lt;/p&gt;
  &lt;p&gt;Description &lt;input type="text" name="description"/&gt;&lt;/p&gt;
  
  ----------------------------------------------&lt;/br&gt;
  &lt;input type="submit" name="Submit"&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>The setLiqour.php file.. this code works when i change the insert data to text and put it into the wp page but I don't know how to get the html form to send the data to it.</p>
  
  <pre><code>&lt;?php
  $lq_name = sanitize_text_field( $_POST['name']);
  $description = $_POST['description'];
  $table_name = $wpdb-&gt;prefix . "Liquor_Type";
  $wpdb-&gt;insert( $table_name, array(
      'lq_name' =&gt; $lq_name,
      'description' =&gt; $description
  ) );
  ?&gt;
  </code></pre>