title: Insert data into database with jsp and go to next form
body: <p>I have three different forms(html) that are related each other, insert.jsp (process data that submit to db) and 1 table in database. I need to save the data to database and continue with the next form. The next data also save in the same table. When I try submit the first form it save to table in database but the second form not save it. </p>
  
  <p>I have 3 forms in html pages that I used tab menu and want to save it in same table in database. How to solve it?                            </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;General&lt;/title&gt;
  &lt;link href="css/tabs.css" rel="stylesheet" type="text/css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;General&lt;/h1&gt;
  &lt;ol id="toc"&gt;
  &lt;li class="current"&gt;&lt;a href="general.html"&gt;General&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="contacts.html"&gt;Contacts&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="address.html"&gt;Address&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="loginform.html"&gt;Login&lt;/a&gt;&lt;/li&gt;
  &lt;/ol&gt;
  &lt;div class="content"&gt;
  &lt;h3&gt;General Form&lt;/h3&gt;
  &lt;form name="frmRegister" action="insert.jsp" method="post"&gt;
  
          &lt;table&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;ID:&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" size="40" name="unit_id" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;First Name:&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" size="40" name="first_name" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;Last Name&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" size="40" name="last_name" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;Department:&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" size="40" name="department" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;Position:&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" size="40" name="position" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;&lt;input type="submit" name="submit" value="Save" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;/table&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>