Here is sample tables
Case
Case_ID AC_ID ASSET_ID
Action
Action_ID Case_ID Step_No Date_Started Date_Completed Status
Procedure
P_ID Step_No Name AU_ID AC_ID
1 1 Step1a 1 1
2 2 Step2b 1 1
3 3 Step3c 1 1
4 1 Step1a 2 1
5 2 Step2b 2 1
6 3 Step1c 2 1
7 4 Step1d 2 1
8 1 Step1a 1 2
9 2 Step2b 1 2
10 3 Step3c 1 2
Asset
ASSET_ID AU_ID AC_ID
1 1 1
2 1 1
3 1 2
4 1 2
5 2 1
6 2 1
7 2 2
8 2 2
This submit form that I done,
<html>
<form method="post" action="insertvalue.php" enctype="multipart/form-data">
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#EBDDE2">
<tr><td >Asset ID :</td><td width="260"><input type="text" size="33" name="ASSEET_ID" maxlength="100" /></td></tr>
<tr><td >Asset Category :</td><td><select name="cat" style="width: 226px;">
<option value="1"> Post Office </option>
<option value="2"> Education </option> </td></tr>
<tr><td></td><td><input type="submit" name="Submit" value="Submit</td></tr>
</table>
</form>
</html>
Now, my problem is how to insert values from the submit form into the table Case and Action. The result will be like the tables below.
If user submit ASSET_ID = 3 and AC_ID = 2
Case
Case_ID AC_ID ASSET_ID
1 2 3
Action
Action_ID Case_ID Step_No Date_Started Date_Completed Status
1 1 1 - - -
2 1 2 - - -
3 1 3 - - -
Note: Action_ID and Case_ID are auto increment value , I’m using SQL database
Appreciate your help....