Hi I am trying to set up a data entry form which allows the user to enter details of say 10 new items to add to a mysql database. Each items has several values that can be entered for it.
Here’s the code I have for my form:
<form name="form1" method="post" action="" enctype="multipart/form-data">
<table>
<tr>
<td>
<input type='text' name='Item[]' id='Item' value=''>
</td>
<td><input type='text' name='Season[]' id='Season' value='' style="width:50px;"></td>
<td><input type='text' name='Sml[]' id='Sml' value='' style="width:30px;"></td>
<td><input type='text' name='Med[]' id='Med' value='' style="width:30px;"></td>
<td><input type='text' name='Lrg[]' id='Lrg' value='' style="width:30px;"></td>
<td><input type='text' name='XLrg[]' id='XLrg' value='' style="width:30px;"></td>
<td><input type='text' name='XXLrg[]' id='XXLrg' value='' style="width:30px;"></td>
<td><input type='text' name='XXXLrg[]' id='XXXLrg' value='' style="width:30px;"></td>
<td><input type='text' name='XSB[]' id='XSB' value='' style="width:30px;"></td>
<td><input type='text' name='SB[]' id='SB' value='' style="width:30px;"></td>
<td><input type='text' name='MB[]' id='MB' value='' style="width:30px;"></td>
<td><input type='text' name='LB[]' id='LB' value='' style="width:30px;"></td>
<td><input type='text' name='XLB[]' id='XLB' value='' style="width:30px;"></td>
<td><input type='text' name='Box_Number[]' id='Box_Number' value='' style="width:40px;"></td>
<td><input type='text' name='Barcode[]' id='Barcode' value='' style="width:50px;"></td>
<td><input type='text' name='Info[]' id='Info' value=''></td>
</tr>
<tr>
<td>
<input type='text' name='Item[]' id='Item' value=''>
</td>
<td><input type='text' name='Season[]' id='Season' value='' style="width:50px;"></td>
<td><input type='text' name='Sml[]' id='Sml' value='' style="width:30px;"></td>
<td><input type='text' name='Med[]' id='Med' value='' style="width:30px;"></td>
<td><input type='text' name='Lrg[]' id='Lrg' value='' style="width:30px;"></td>
<td><input type='text' name='XLrg[]' id='XLrg' value='' style="width:30px;"></td>
<td><input type='text' name='XXLrg[]' id='XXLrg' value='' style="width:30px;"></td>
<td><input type='text' name='XXXLrg[]' id='XXXLrg' value='' style="width:30px;"></td>
<td><input type='text' name='XSB[]' id='XSB' value='' style="width:30px;"></td>
<td><input type='text' name='SB[]' id='SB' value='' style="width:30px;"></td>
<td><input type='text' name='MB[]' id='MB' value='' style="width:30px;"></td>
<td><input type='text' name='LB[]' id='LB' value='' style="width:30px;"></td>
<td><input type='text' name='XLB[]' id='XLB' value='' style="width:30px;"></td>
<td><input type='text' name='Box_Number[]' id='Box_Number' value='' style="width:40px;"></td>
<td><input type='text' name='Barcode[]' id='Barcode' value='' style="width:50px;"></td>
<td><input type='text' name='Info[]' id='Info' value=''></td>
</tr>
<tr>
<td>
<input type='text' name='Item[]' id='Item' value=''>
</td>
<td><input type='text' name='Season[]' id='Season' value='' style="width:50px;"></td>
<td><input type='text' name='Sml[]' id='Sml' value='' style="width:30px;"></td>
<td><input type='text' name='Med[]' id='Med' value='' style="width:30px;"></td>
<td><input type='text' name='Lrg[]' id='Lrg' value='' style="width:30px;"></td>
<td><input type='text' name='XLrg[]' id='XLrg' value='' style="width:30px;"></td>
<td><input type='text' name='XXLrg[]' id='XXLrg' value='' style="width:30px;"></td>
<td><input type='text' name='XXXLrg[]' id='XXXLrg' value='' style="width:30px;"></td>
<td><input type='text' name='XSB[]' id='XSB' value='' style="width:30px;"></td>
<td><input type='text' name='SB[]' id='SB' value='' style="width:30px;"></td>
<td><input type='text' name='MB[]' id='MB' value='' style="width:30px;"></td>
<td><input type='text' name='LB[]' id='LB' value='' style="width:30px;"></td>
<td><input type='text' name='XLB[]' id='XLB' value='' style="width:30px;"></td>
<td><input type='text' name='Box_Number[]' id='Box_Number' value='' style="width:40px;"></td>
<td><input type='text' name='Barcode[]' id='Barcode' value='' style="width:50px;"></td>
<td><input type='text' name='Info[]' id='Info' value=''></td>
</tr>
<tr>
<input type="submit" name="Submit" value="Update Values" style="width:100px; height:25px; cursor:pointer; font-size:12px;"></tr>
</table>
</form>
Can anyone tell me how I would code the process script so it would insert each new record entered into the database and if any of the rows in the form were not filled in it would ignore these?
thanks for any help in advance