title: How to store data taken from a <form> in an HTML page to a local database?
body: <p>I have a basic form in an HTML page which takes the <code>name</code> and <code>email</code> of an user and I want to store those details into a database. But, as far as I know javascript is a client side script so it can't directly connect to a database server. So, how do I store the data?</p>
  <p>My code:</p>
  <pre><code>&lt;form class=&quot;details&quot;&gt;
  
          Full name: &lt;input type=&quot;text&quot; id=&quot;name&quot; size=25&gt;&lt;br&gt;    
          E-mail: &lt;input type=&quot;email&quot; id=&quot;email&quot; size=25&gt;&lt;br&gt;&lt;br&gt;
      
  &lt;/form&gt;
  
  &lt;button id=&quot;button&quot; onclick=&quot;submit()&quot;&gt;Register&lt;/button&gt;
  
  &lt;script&gt;
  
       function submit(){// how do I connect to a database??}
  &lt;/script&gt;
  </code></pre>