无法插入多个数据需要救援

As you can see I'm making a scoreboard program I have a multiple entries that I need to save to the database...but my problem is the 'frm1' only saves in the database the other 9 entries that I inputted doesn't save? btw I'm just a newbie programmer my codes is ugly sorry.

html code:

<form action="interview.php" method="post">
<font color="#000000">
<center>
 <table border="1" width="970" height="" bgcolor="#FFFFFF"> 
    <br />
    <center>
    <table border="1" width="910" height="" cellpadding="0" cellspacing="0" align="center"> 

         <tr height="8">
          <form name="frm1" id="frm1" >
            <td width="369"><input name="name1" type="text"  value="" required size="41" id="query1" onblur="getvalues1()" /></td>
            <td width="113">
            <input type="radio" name="optA1" value="1" onClick="optTotal1()" />1
            <input type="radio" name="optA1" value="2" onClick="optTotal1()" />2
            <input type="radio" name="optA1" value="3" onClick="optTotal1()" />3
            </td>
            <td width="109">
            <input type="radio" name="optB1" value="1" onClick="optTotal1()" />1
            <input type="radio" name="optB1" value="2" onClick="optTotal1()" />2
            <input type="radio" name="optB1" value="3" onClick="optTotal1()" />3
            </td>
            <td width="79">
            <input type="radio" name="optC1" value="1" onClick="optTotal1()" />1
            <input type="radio" name="optC1" value="2" onClick="optTotal1()" />2
            </td>
            <td width="84">
            <input type="radio" name="optD1" value="1" onClick="optTotal1()" />1
            <input type="radio" name="optD1" value="2" onClick="optTotal1()" />2
            </td>
            <td width="53"><input type="text" name="total1" onKeyUp="optTotal1()" readonly size="3" /></td>
            <td width="87"><input name="remarks1" type="text"  value="" required size="8" readonly /></td>
            </form>
        </tr>

         <tr height="8">
         <form name="frm2" id="frm2" >
            <td width="369"><input name="name2" type="text"  value="" required size="41" id="query2" onblur="getvalues2()" /></td>
            <td width="113">
            <input type="radio" name="optA2" value="1" onClick="optTotal2()" />1
            <input type="radio" name="optA2" value="2" onClick="optTotal2()" />2
            <input type="radio" name="optA2" value="3" onClick="optTotal2()" />3
            </td>
            <td width="109">
            <input type="radio" name="optB2" value="1" onClick="optTotal2()" />1
            <input type="radio" name="optB2" value="2" onClick="optTotal2()" />2
            <input type="radio" name="optB2" value="3" onClick="optTotal2()" />3
            </td>
            <td width="79">
            <input type="radio" name="optC2" value="1" onClick="optTotal2()" />1
            <input type="radio" name="optC2" value="2" onClick="optTotal2()" />2
            </td>
            <td width="84">
            <input type="radio" name="optD2" value="1" onClick="optTotal2()" />1
            <input type="radio" name="optD2" value="2" onClick="optTotal2()" />2
            </td>
            <td width="53"><input type="text" name="total2" id="total2" onKeyUp="optTotal2()" readonly size="3" /></td>
            <td width="87"><input name="remarks2" type="text"  value="" required size="8" readonly /></td>
            </form>
        </tr>

         <tr height="8">
          <form name="frm3" id="frm3" >
            <td width="369"><input name="name3" type="text"  value="" required size="41" id="query3" onblur="getvalues3()" /></td>
            <td width="113">
            <input type="radio" name="optA3" value="1" onClick="optTotal3()" />1
            <input type="radio" name="optA3" value="2" onClick="optTotal3()" />2
            <input type="radio" name="optA3" value="3" onClick="optTotal3()" />3
            </td>
            <td width="109">
            <input type="radio" name="optB3" value="1" onClick="optTotal3()" />1
            <input type="radio" name="optB3" value="2" onClick="optTotal3()" />2
            <input type="radio" name="optB3" value="3" onClick="optTotal3()" />3
            </td>
            <td width="79">
            <input type="radio" name="optC3" value="1" onClick="optTotal3()" />1
            <input type="radio" name="optC3" value="2" onClick="optTotal3()" />2
            </td>
            <td width="84">
            <input type="radio" name="optD3" value="1" onClick="optTotal3()" />1
            <input type="radio" name="optD3" value="2" onClick="optTotal3()" />2
            </td>
            <td width="53"><input type="text" name="total3" onKeyUp="optTotal3()" readonly size="3" /></td>
            <td width="87"><input name="remarks3" type="text"  value="" required size="8" readonly /></td>
            </form>
        </tr>

         <tr height="8">
           <form name="frm4" id="frm4" >
            <td width="369"><input name="name4" type="text"  value="" required size="41" id="query4" onblur="getvalues4()" /></td>
            <td width="113">
            <input type="radio" name="optA4" value="1" onClick="optTotal4()" />1
            <input type="radio" name="optA4" value="2" onClick="optTotal4()" />2
            <input type="radio" name="optA4" value="3" onClick="optTotal4()" />3
            </td>
            <td width="109">
            <input type="radio" name="optB4" value="1" onClick="optTotal4()" />1
            <input type="radio" name="optB4" value="2" onClick="optTotal4()" />2
            <input type="radio" name="optB4" value="3" onClick="optTotal4()" />3
            </td>
            <td width="79">
            <input type="radio" name="optC4" value="1" onClick="optTotal4()" />1
            <input type="radio" name="optC4" value="2" onClick="optTotal4()" />2
            </td>
            <td width="84">
            <input type="radio" name="optD4" value="1" onClick="optTotal4()" />1
            <input type="radio" name="optD4" value="2" onClick="optTotal4()" />2
            </td>
            <td width="53"><input type="text" name="total4" onKeyUp="optTotal4()" readonly size="3" /></td>
            <td width="87"><input name="remarks4" type="text"  value="" required size="8" readonly /></td>
            </form>
        </tr>

         <tr height="8">
          <form name="frm5" id="frm5" >
            <td width="369"><input name="name5" type="text"  value="" required size="41" id="query5" onblur="getvalues5()" /></td>
            <td width="113">
            <input type="radio" name="optA5" value="1" onClick="optTotal5()" />1
            <input type="radio" name="optA5" value="2" onClick="optTotal5()" />2
            <input type="radio" name="optA5" value="3" onClick="optTotal5()" />3
            </td>
            <td width="109">
            <input type="radio" name="optB5" value="1" onClick="optTotal5()" />1
            <input type="radio" name="optB5" value="2" onClick="optTotal5()" />2
            <input type="radio" name="optB5" value="3" onClick="optTotal5()" />3
            </td>
            <td width="79">
            <input type="radio" name="optC5" value="1" onClick="optTotal5()" />1
            <input type="radio" name="optC5" value="2" onClick="optTotal5()" />2
            </td>
            <td width="84">
            <input type="radio" name="optD5" value="1" onClick="optTotal5()" />1
            <input type="radio" name="optD5" value="2" onClick="optTotal5()" />2
            </td>
            <td width="53"><input type="text" name="total5" onKeyUp="optTotal5()" readonly size="3" /></td>
            <td width="87"><input name="remarks5" type="text"  value="" required size="8" readonly /></td>
            </form>
        </tr>

         <tr height="8">
          <form name="frm6" id="frm6" >
            <td width="369"><input name="name6" type="text"  value="" required size="41" id="query6" onblur="getvalues6()" /></td>
            <td width="113">
            <input type="radio" name="optA6" value="1" onClick="optTotal6()" />1
            <input type="radio" name="optA6" value="2" onClick="optTotal6()" />2
            <input type="radio" name="optA6" value="3" onClick="optTotal6()" />3
            </td>
            <td width="109">
            <input type="radio" name="optB6" value="1" onClick="optTotal6()" />1
            <input type="radio" name="optB6" value="2" onClick="optTotal6()" />2
            <input type="radio" name="optB6" value="3" onClick="optTotal6()" />3
            </td>
            <td width="79">
            <input type="radio" name="optC6" value="1" onClick="optTotal6()" />1
            <input type="radio" name="optC6" value="2" onClick="optTotal6()" />2
            </td>
            <td width="84">
            <input type="radio" name="optD6" value="1" onClick="optTotal6()" />1
            <input type="radio" name="optD6" value="2" onClick="optTotal6()" />2
            </td>
            <td width="53"><input type="text" name="total6" onKeyUp="optTotal6()" readonly size="3" /></td>
            <td width="87"><input name="remarks6" type="text"  value="" required size="8" readonly /></td>
            </form>
        </tr>

         <tr height="8">
          <form name="frm7" id="frm7" >
            <td width="369"><input name="name7" type="text"  value="" required size="41" id="query7" onblur="getvalues7()" /></td>
            <td width="113">
            <input type="radio" name="optA7" value="1" onClick="optTotal7()" />1
            <input type="radio" name="optA7" value="2" onClick="optTotal7()" />2
            <input type="radio" name="optA7" value="3" onClick="optTotal7()" />3
            </td>
            <td width="109">
            <input type="radio" name="optB7" value="1" onClick="optTotal7()" />1
            <input type="radio" name="optB7" value="2" onClick="optTotal7()" />2
            <input type="radio" name="optB7" value="3" onClick="optTotal7()" />3
            </td>
            <td width="79">
            <input type="radio" name="optC7" value="1" onClick="optTotal7()" />1
            <input type="radio" name="optC7" value="2" onClick="optTotal7()" />2
            </td>
            <td width="84">
            <input type="radio" name="optD7" value="1" onClick="optTotal7()" />1
            <input type="radio" name="optD7" value="2" onClick="optTotal7()" />2
            </td>
            <td width="53"><input type="text" name="total7" onKeyUp="optTotal7()" readonly size="3" /></td>
            <td width="87"><input name="remarks7" type="text"  value="" required size="8" readonly /></td>
            </form>
        </tr>

         <tr height="8">
         <form name="frm8" id="frm8" >
            <td width="369"><input name="name8" type="text"  value="" required size="41" id="query8" onblur="getvalues8()" /></td>
            <td width="113">
            <input type="radio" name="optA8" value="1" onClick="optTotal8()" />1
            <input type="radio" name="optA8" value="2" onClick="optTotal8()" />2
            <input type="radio" name="optA8" value="3" onClick="optTotal8()" />3
            </td>
            <td width="109">
            <input type="radio" name="optB8" value="1" onClick="optTotal8()" />1
            <input type="radio" name="optB8" value="2" onClick="optTotal8()" />2
            <input type="radio" name="optB8" value="3" onClick="optTotal8()" />3
            </td>
            <td width="79">
            <input type="radio" name="optC8" value="1" onClick="optTotal8()" />1
            <input type="radio" name="optC8" value="2" onClick="optTotal8()" />2
            </td>
            <td width="84">
            <input type="radio" name="optD8" value="1" onClick="optTotal8()" />1
            <input type="radio" name="optD8" value="2" onClick="optTotal8()" />2
            </td>
            <td width="53"><input type="text" name="total8" onKeyUp="optTotal8()" readonly size="3" /></td>
            <td width="87"><input name="remarks8" type="text"  value="" required size="8" readonly /></td>
            </form>
        </tr>

         <tr height="8">
         <form name="frm9" id="frm9" >
            <td width="369"><input name="name9" type="text"  value="" required size="41" id="query9" onblur="getvalues9()" /></td>
            <td width="113">
            <input type="radio" name="optA9" value="1" onClick="optTotal9()" />1
            <input type="radio" name="optA9" value="2" onClick="optTotal9()" />2
            <input type="radio" name="optA9" value="3" onClick="optTotal9()" />3
            </td>
            <td width="109">
            <input type="radio" name="optB9" value="1" onClick="optTotal9()" />1
            <input type="radio" name="optB9" value="2" onClick="optTotal9()" />2
            <input type="radio" name="optB9" value="3" onClick="optTotal9()" />3
            </td>
            <td width="79">
            <input type="radio" name="optC9" value="1" onClick="optTotal9()" />1
            <input type="radio" name="optC9" value="2" onClick="optTotal9()" />2
            </td>
            <td width="84">
            <input type="radio" name="optD9" value="1" onClick="optTotal9()" />1
            <input type="radio" name="optD9" value="2" onClick="optTotal9()" />2
            </td>
            <td width="53"><input type="text" name="total9" onKeyUp="optTotal9()" readonly size="3" /></td>
            <td width="87"><input name="remarks9" type="text"  value="" required size="8" readonly /></td>
            </form>
        </tr>

         <tr height="8">
          <form name="frm10" id="frm10" >
            <td width="369"><input name="name10" type="text"  value="" required size="41" id="query10" onblur="getvalues10()" /></td>
            <td width="113">
            <input type="radio" name="optA10" value="1" onClick="optTotal10()" />1
            <input type="radio" name="optA10" value="2" onClick="optTotal10()" />2
            <input type="radio" name="optA10" value="3" onClick="optTotal10()" />3
            </td>
            <td width="109">
            <input type="radio" name="optB10" value="1" onClick="optTotal10()" />1
            <input type="radio" name="optB10" value="2" onClick="optTotal10()" />2
            <input type="radio" name="optB10" value="3" onClick="optTotal10()" />3
            </td>
            <td width="79">
            <input type="radio" name="optC10" value="1" onClick="optTotal10()" />1
            <input type="radio" name="optC10" value="2" onClick="optTotal10()" />2
            </td>
            <td width="84">
            <input type="radio" name="optD10" value="1" onClick="optTotal10()" />1
            <input type="radio" name="optD10" value="2" onClick="optTotal10()" />2
            </td>
            <td width="53"><input type="text" name="total10" onKeyUp="optTotal10()" readonly size="3" /></td>
            <td width="87"><input name="remarks10" type="text"  value="" required size="8" readonly /></td>
            </form>
        </tr>

            </table></center>
            <center>
    <br />
        _______________________________<br />
              Signature of Rater
        <br></center>
        <br>
 <!--hidden inputs for repcode and username session starts-->

<input type="hidden" name="username" id="username" value="<?php echo $_SESSION['username']; ?> " />
<input type="hidden" name="repcode" id="repcode" value="<?php echo $_SESSION['repcode']; ?> " />

<!--hidden inputs for repcode and username session starts-->
<!--hidden inputs for aic and batchcode starts-->
<!--1-->
<input type="hidden" name="aic1" id="aic1"/>
<input type="hidden" name="batchcode1" id="batchcode1" />
<!--2-->
<input type="hidden" name="aic2" id="aic2"/>
<input type="hidden" name="batchcode2" id="batchcode2" />
<!--3-->
<input type="hidden" name="aic3" id="aic3"/>
<input type="hidden" name="batchcode3" id="batchcode3" />
<!--4-->
<input type="hidden" name="aic4" id="aic4"/>
<input type="hidden" name="batchcode4" id="batchcode4" />
<!--5-->
<input type="hidden" name="aic5" id="aic5"/>
<input type="hidden" name="batchcode5" id="batchcode5" />
<!--6-->
<input type="hidden" name="aic6" id="aic6"/>
<input type="hidden" name="batchcode6" id="batchcode6" />
<!--7-->
<input type="hidden" name="aic7" id="aic7"/>
<input type="hidden" name="batchcode7" id="batchcode7" />
<!--8-->
<input type="hidden" name="aic8" id="aic8"/>
<input type="hidden" name="batchcode8" id="batchcode8" />
<!--9-->
<input type="hidden" name="aic9" id="aic9"/>
<input type="hidden" name="batchcode9" id="batchcode9" />
<!--10-->
<input type="hidden" name="aic10" id="aic10"/>
<input type="hidden" name="batchcode10" id="batchcode10" />
<!--hidden inputs for aic and batchcode ends-->    

 <input type="submit" style="width:964px;height:30px" value="CLICK ME TO SAVE" name="save" id="press" />

        </center>
        </td>
        </tr>
 </table>
</font>
</form>

php code:

<?php

if(isset($_POST['save']))
{
include('connection.php');
//opt1
$opt1aic = array_key_exists('aic1', $_POST) ? $_POST['aic1'] : null;
$opt1batchcode = array_key_exists('batchcode1', $_POST) ? $_POST['batchcode1'] : null;
$opt1name = array_key_exists('name1', $_POST) ? $_POST['name1'] : null;
$opt1score1 = array_key_exists('optA1', $_POST) ? $_POST['optA1'] : null;
$opt1score2 = array_key_exists('optB1', $_POST) ? $_POST['optB1'] : null;
$opt1score3 = array_key_exists('optC1', $_POST) ? $_POST['optC1'] : null;
$opt1score4 = array_key_exists('optD1', $_POST) ? $_POST['optD1'] : null;
$opt1total = ($opt1score1 + $opt1score2 + $opt1score3 + $opt1score4);
//opt2
$opt2aic = array_key_exists('aic2', $_POST) ? $_POST['aic2'] : null;
$opt2batchcode = array_key_exists('batchcode2', $_POST) ? $_POST['batchcode2'] : null;
$opt2name = array_key_exists('name2', $_POST) ? $_POST['name2'] : null;
$opt2score1 = array_key_exists('optA2', $_POST) ? $_POST['optA2'] : null;
$opt2score2 = array_key_exists('optB2', $_POST) ? $_POST['optB2'] : null;
$opt2score3 = array_key_exists('optC2', $_POST) ? $_POST['optC2'] : null;
$opt2score4 = array_key_exists('optD2', $_POST) ? $_POST['optD2'] : null;
$opt2total = ($opt2score1 + $opt2score2 + $opt2score3 + $opt2score4);
//opt3
$opt3aic = array_key_exists('aic3', $_POST) ? $_POST['aic3'] : null;
$opt3batchcode = array_key_exists('batchcode3', $_POST) ? $_POST['batchcode3'] : null;
$opt3name = array_key_exists('name3', $_POST) ? $_POST['name3'] : null;
$opt3score1 = array_key_exists('optA3', $_POST) ? $_POST['optA3'] : null;
$opt3score2 = array_key_exists('optB3', $_POST) ? $_POST['optB3'] : null;
$opt3score3 = array_key_exists('optC3', $_POST) ? $_POST['optC3'] : null;
$opt3score4 = array_key_exists('optD3', $_POST) ? $_POST['optD3'] : null;
$opt3total = ($opt3score1 + $opt3score2 + $opt3score3 + $opt3score4);
//opt4
$opt4aic = array_key_exists('aic4', $_POST) ? $_POST['aic4'] : null;
$opt4batchcode = array_key_exists('batchcode4', $_POST) ? $_POST['batchcode4'] : null;
$opt4name = array_key_exists('name4', $_POST) ? $_POST['name4'] : null;
$opt4score1 = array_key_exists('optA4', $_POST) ? $_POST['optA4'] : null;
$opt4score2 = array_key_exists('optB4', $_POST) ? $_POST['optB4'] : null;
$opt4score3 = array_key_exists('optC4', $_POST) ? $_POST['optC4'] : null;
$opt4score4 = array_key_exists('optD4', $_POST) ? $_POST['optD4'] : null;
$opt4total = ($opt4score1 + $opt4score2 + $opt4score3 + $opt4score4);
//opt5
$opt5aic = array_key_exists('aic5', $_POST) ? $_POST['aic5'] : null;
$opt5batchcode = array_key_exists('batchcode5', $_POST) ? $_POST['batchcode5'] : null;
$opt5name = array_key_exists('name5', $_POST) ? $_POST['name5'] : null;
$opt5score1 = array_key_exists('optA5', $_POST) ? $_POST['optA5'] : null;
$opt5score2 = array_key_exists('optB5', $_POST) ? $_POST['optB5'] : null;
$opt5score3 = array_key_exists('optC5', $_POST) ? $_POST['optC5'] : null;
$opt5score4 = array_key_exists('optD5', $_POST) ? $_POST['optD5'] : null;
$opt5total = ($opt5score1 + $opt5score2 + $opt5score3 + $opt5score4);
//opt6
$opt6aic = array_key_exists('aic6', $_POST) ? $_POST['aic6'] : null;
$opt6batchcode = array_key_exists('batchcode6', $_POST) ? $_POST['batchcode6'] : null;
$opt6name = array_key_exists('name6', $_POST) ? $_POST['name6'] : null;
$opt6score1 = array_key_exists('optA6', $_POST) ? $_POST['optA6'] : null;
$opt6score2 = array_key_exists('optB6', $_POST) ? $_POST['optB6'] : null;
$opt6score3 = array_key_exists('optC6', $_POST) ? $_POST['optC6'] : null;
$opt6score4 = array_key_exists('optD6', $_POST) ? $_POST['optD6'] : null;
$opt6total = ($opt6score1 + $opt6score2 + $opt6score3 + $opt6score4);
//opt7
$opt7aic = array_key_exists('aic7', $_POST) ? $_POST['aic7'] : null;
$opt7batchcode = array_key_exists('batchcode7', $_POST) ? $_POST['batchcode7'] : null;
$opt7name = array_key_exists('name7', $_POST) ? $_POST['name7'] : null;
$opt7score1 = array_key_exists('optA7', $_POST) ? $_POST['optA7'] : null;
$opt7score2 = array_key_exists('optB7', $_POST) ? $_POST['optB7'] : null;
$opt7score3 = array_key_exists('optC7', $_POST) ? $_POST['optC7'] : null;
$opt7score4 = array_key_exists('optD7', $_POST) ? $_POST['optD7'] : null;
$opt7total = ($opt7score1 + $opt7score2 + $opt7score3 + $opt7score4);
//opt8
$opt8aic = array_key_exists('aic8', $_POST) ? $_POST['aic8'] : null;
$opt8batchcode = array_key_exists('batchcode8', $_POST) ? $_POST['batchcode8'] : null;
$opt8name = array_key_exists('name8', $_POST) ? $_POST['name8'] : null;
$opt8score1 = array_key_exists('optA8', $_POST) ? $_POST['optA8'] : null;
$opt8score2 = array_key_exists('optB8', $_POST) ? $_POST['optB8'] : null;
$opt8score3 = array_key_exists('optC8', $_POST) ? $_POST['optC8'] : null;
$opt8score4 = array_key_exists('optD8', $_POST) ? $_POST['optD8'] : null;
$opt8total = ($opt8score1 + $opt8score2 + $opt8score3 + $opt8score4);
//opt9
$opt9aic = array_key_exists('aic9', $_POST) ? $_POST['aic9'] : null;
$opt9batchcode = array_key_exists('batchcode9', $_POST) ? $_POST['batchcode9'] : null;
$opt9name = array_key_exists('name9', $_POST) ? $_POST['name9'] : null;
$opt9score1 = array_key_exists('optA9', $_POST) ? $_POST['optA9'] : null;
$opt9score2 = array_key_exists('optB9', $_POST) ? $_POST['optB9'] : null;
$opt9score3 = array_key_exists('optC9', $_POST) ? $_POST['optC9'] : null;
$opt9score4 = array_key_exists('optD9', $_POST) ? $_POST['optD9'] : null;
$opt9total = ($opt9score1 + $opt9score2 + $opt9score3 + $opt9score4);
//opt10
$opt10aic = array_key_exists('aic10', $_POST) ? $_POST['aic10'] : null;
$opt10batchcode = array_key_exists('batchcode10', $_POST) ? $_POST['batchcode10'] : null;
$opt10name = array_key_exists('name10', $_POST) ? $_POST['name10'] : null;
$opt10score1 = array_key_exists('optA10', $_POST) ? $_POST['optA10'] : null;
$opt10score2 = array_key_exists('optB10', $_POST) ? $_POST['optB10'] : null;
$opt10score3 = array_key_exists('optC10', $_POST) ? $_POST['optC10'] : null;
$opt10score4 = array_key_exists('optD10', $_POST) ? $_POST['optD10'] : null;
$opt10total = ($opt10score1 + $opt10score2 + $opt10score3 + $opt10score4);

$username = mysql_real_escape_string($_SESSION['username']);
$repcode = mysql_real_escape_string($_SESSION['repcode']);
$position = mysql_real_escape_string($_POST['position']);
$division = mysql_real_escape_string($_POST['division']);
$sgrade = mysql_real_escape_string($_POST['sgrade']);
$salary = mysql_real_escape_string($_POST['salary']);   

//insert 1
if($opt1aic != "" && $opt1batchcode != "" && $opt1name != "" && $opt1score1 != "" && $opt1score2 != "" && $opt1score3 != "" && $opt1score4 != "" && $opt1total != ""){
mysql_query("INSERT INTO app_interview (intrepcode,atic,atbatchcode,position,division,sgrade,salary,atname,gen_info,com_ability,attitude,appearance,inttotal,dateinterviewed) VALUES ('$repcode','$opt1aic','$opt1batchcode','$position','$division','$sgrade','$salary','$opt1name','$opt1score1','$opt1score2','$opt1score3','$opt1score4','$opt1total',CURRENT_TIMESTAMP)");
}
//insert 2
if($opt2aic != "" && $opt2batchcode != "" && $opt2name != "" && $opt2score1 != "" && $opt2score2 != "" && $opt2score3 != "" && $opt2score4 != "" && $opt2total != ""){
mysql_query("INSERT INTO app_interview (intrepcode,atic,atbatchcode,position,division,sgrade,salary,atname,gen_info,com_ability,attitude,appearance,inttotal,dateinterviewed) VALUES ('$repcode','$opt2aic','$opt2batchcode','$position','$division','$sgrade','$salary','$opt2name','$opt2score1','$opt2score2','$opt2score3','$opt2score4','$opt2total',CURRENT_TIMESTAMP)");
}
//insert 3
if($opt3aic != "" && $opt3batchcode != "" && $opt3name != "" && $opt3score1 != "" && $opt3score2 != "" && $opt3score3 != "" && $opt3score4 != "" && $opt3total != ""){
mysql_query("INSERT INTO app_interview (intrepcode,atic,atbatchcode,position,division,sgrade,salary,atname,gen_info,com_ability,attitude,appearance,inttotal,dateinterviewed) VALUES ('$repcode','$opt3aic','$opt3batchcode','$position','$division','$sgrade','$salary','$opt3name','$opt3score1','$opt3score2','$opt3score3','$opt3score4','$opt3total',CURRENT_TIMESTAMP)");
}
//insert 4
if($opt4aic != "" && $opt4batchcode != "" && $opt4name != "" && $opt4score1 != "" && $opt4score2 != "" && $opt4score3 != "" && $opt4score4 != "" && $opt4total != ""){
mysql_query("INSERT INTO app_interview (intrepcode,atic,atbatchcode,position,division,sgrade,salary,atname,gen_info,com_ability,attitude,appearance,inttotal,dateinterviewed) VALUES ('$repcode','$opt4aic','$opt4batchcode','$position','$division','$sgrade','$salary','$opt4name','$opt4score1','$opt4score2','$opt4score3','$opt4score4','$opt4total',CURRENT_TIMESTAMP)");
}
//insert 5
if($opt5aic != "" && $opt5batchcode != "" && $opt5name != "" && $opt5score1 != "" && $opt5score2 != "" && $opt5score3 != "" && $opt5score4 != "" && $opt5total != ""){
mysql_query("INSERT INTO app_interview (intrepcode,atic,atbatchcode,position,division,sgrade,salary,atname,gen_info,com_ability,attitude,appearance,inttotal,dateinterviewed) VALUES ('$repcode','$opt5aic','$opt5batchcode','$position','$division','$sgrade','$salary','$opt5name','$opt5score1','$opt5score2','$opt5score3','$opt5score4','$opt5total',CURRENT_TIMESTAMP)");
}
//insert 6
if($opt6aic != "" && $opt6batchcode != "" && $opt6name != "" && $opt6score1 != "" && $opt6score2 != "" && $opt6score3 != "" && $opt6score4 != "" && $opt6total != ""){
mysql_query("INSERT INTO app_interview (intrepcode,atic,atbatchcode,position,division,sgrade,salary,atname,gen_info,com_ability,attitude,appearance,inttotal,dateinterviewed) VALUES ('$repcode','$opt6aic','$opt6batchcode','$position','$division','$sgrade','$salary','$opt6name','$opt6score1','$opt6score2','$opt6score3','$opt6score4','$opt6total',CURRENT_TIMESTAMP)");
}
//insert 7
if($opt7aic != "" && $opt7batchcode != "" && $opt7name != "" && $opt7score1 != "" && $opt7score2 != "" && $opt7score3 != "" && $opt7score4 != "" && $opt7total != ""){
mysql_query("INSERT INTO app_interview (intrepcode,atic,atbatchcode,position,division,sgrade,salary,atname,gen_info,com_ability,attitude,appearance,inttotal,dateinterviewed) VALUES ('$repcode','$opt7aic','$opt7batchcode','$position','$division','$sgrade','$salary','$opt7name','$opt7score1','$opt7score2','$opt7score3','$opt7score4','$opt7total',CURRENT_TIMESTAMP)");
}
//insert 8
if($opt8aic != "" && $opt8batchcode != "" && $opt8name != "" && $opt8score1 != "" && $opt8score2 != "" && $opt8score3 != "" && $opt8score4 != "" && $opt8total != ""){
mysql_query("INSERT INTO app_interview (intrepcode,atic,atbatchcode,position,division,sgrade,salary,atname,gen_info,com_ability,attitude,appearance,inttotal,dateinterviewed) VALUES ('$repcode','$opt8aic','$opt8batchcode','$position','$division','$sgrade','$salary','$opt8name','$opt8score1','$opt8score2','$opt8score3','$opt8score4','$opt8total',CURRENT_TIMESTAMP)");
}
//insert 9
if($opt9aic != "" && $opt9batchcode != "" && $opt9name != "" && $opt9score1 != "" && $opt9score2 != "" && $opt9score3 != "" && $opt9score4 != "" && $opt9total != ""){
mysql_query("INSERT INTO app_interview (intrepcode,atic,atbatchcode,position,division,sgrade,salary,atname,gen_info,com_ability,attitude,appearance,inttotal,dateinterviewed) VALUES ('$repcode','$opt9aic','$opt9batchcode','$position','$division','$sgrade','$salary','$opt9name','$opt9score1','$opt9score2','$opt9score3','$opt9score4','$opt9total',CURRENT_TIMESTAMP)");
}
//insert 10
if($opt10aic != "" && $opt10batchcode != "" && $opt10name != "" && $opt10score1 != "" && $opt10score2 != "" && $opt10score3 != "" && $opt10score4 != "" && $opt10total != ""){
mysql_query("INSERT INTO app_interview (intrepcode,atic,atbatchcode,position,division,sgrade,salary,atname,gen_info,com_ability,attitude,appearance,inttotal,dateinterviewed) VALUES ('$repcode','$opt10aic','$opt10batchcode','$position','$division','$sgrade','$salary','$opt10name','$opt10score1','$opt10score2','$opt10score3','$opt10score4','$opt10total',CURRENT_TIMESTAMP)");
}

    header("Location:interview.php");
}

?>

I want to save from frm1 to frm10..can anyone help me please.

douwang6635
douwang6635 是的,摆脱所有</form>,但你的最后一个应该是首先需要做的事情。除非你为他们设定了单独的行动,否则肯定会对事情产生影响。
6 年多之前 回复
doubingling4706
doubingling4706 是的,我删除我的迷你表格并更改我的JavaScript...现在它的工作表示感谢
6 年多之前 回复
dongse7261
dongse7261 所有的迷你形式,如<formname=“frm1”id=“frm1”>都可能搞砸了你。
6 年多之前 回复
dozc58418381
dozc58418381 验证您的代码。这是一团糟。此外,通过给出一个像inputName[]这样的名称,PHP将自动生成一个数组。
6 年多之前 回复
dongyouzhui1969
dongyouzhui1969 是的,我需要保存的数据被保存但仅仅是frm1......其他来自frm2-frm10不会...我想知道为什么。
6 年多之前 回复
doumao8803
doumao8803 添加echo('<pre>'。print_r($_POST,1)。'</pre>');你的脚本。你收到了你期待的数据吗?
6 年多之前 回复
dsndm82062
dsndm82062 循环使控制流程变得复杂,并且可能严重损害具有分层缓存的现代无序流水线架构的性能。控制依赖性弹射的整个领域越来越多,研究提高现代硬件性能的方法。看起来OP正在这里应用这些知识。
6 年多之前 回复
doulu7921
doulu7921 伙计,你真的不会复制所有代码,是吗?考虑某种循环。
6 年多之前 回复
doudiemei2013
doudiemei2013 “数据需要救援”---看起来像Call911-Code-Busters的工作
6 年多之前 回复

1个回答

That's because they're not part of the form...

Only fields inside the <form> that you submit are submitted!

dppcyt6157
dppcyt6157 ......这正是我告诉你要做的! 只提交“迷你表格”中的项目!
6 年多之前 回复
dragon0118
dragon0118 我刚刚解决了我自己的问题,删除我的迷你表格frm1-frm10 ..并改变我的javascript函数..感谢你的时间无论如何。
6 年多之前 回复
doukun1450
doukun1450 它们都在同一个<form>中吗? 不,他们不是。
6 年多之前 回复
duankeng9477
duankeng9477 但我认为它们都在形式之内?O.o为什么frm1是唯一可以保存在数据库中的?
6 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问