title: How do I submit form input data with POST request when button is clicked?
body: <p>So far, I have a basic form that gets 2 inputs. The submit button successfully adds the new record to the SQLite database but with the values from the input elements. I am definitely missing how to properly set this up in my JavaScript code but I just don't know how to implement it.</p>
  
  <p>JavaScript</p>
  
  <pre><code>var xhttp = new XMLHttpRequest();
  
  const items_url = "http://127.0.0.1:3000/items"
  
  function addingItems(){
      xhttp.open("POST", items_url, true);
      // Value implementation here maybe...
      console.log("Form button has been clicked for item entry submission");
      console.log(xhttp);
      xhttp.send();
  }   
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;form method="POST" class="addItem"&gt;
      &lt;input type="text" placeholder="Title" name="item_title" required&gt;
      &lt;input type="text" placeholder="Number" name="item_number" required&gt;
      &lt;button id="submitItem" type="submit" form="addItem" value="Submit" onclick="addingItems()"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Please let me know if you need more information.</p>