Insert data into database with jsp and go to next form
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.
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?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>General</title>
<link href="css/tabs.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>General</h1>
<ol id="toc">
<li class="current"><a href="general.html">General</a></li>
<li><a href="contacts.html">Contacts</a></li>
<li><a href="address.html">Address</a></li>
<li><a href="loginform.html">Login</a></li>
</ol>
<div class="content">
<h3>General Form</h3>
<form name="frmRegister" action="insert.jsp" method="post">
<table>
<tr>
<td>ID:</td>
<td><input type="text" size="40" name="unit_id" /></td>
</tr>
<tr>
<td>First Name:</td>
<td><input type="text" size="40" name="first_name" /></td>
</tr>
<tr>
<td>Last Name</td>
<td><input type="text" size="40" name="last_name" /></td>
</tr>
<tr>
<td>Department:</td>
<td><input type="text" size="40" name="department" /></td>
</tr>
<tr>
<td>Position:</td>
<td><input type="text" size="40" name="position" /></td>
</tr>
<tr>
<td><input type="submit" name="submit" value="Save" /></td>
</tr>
</ta开发者_开发知识库ble>
</form>
</div>
</body>
</html>
精彩评论