我的动态表行插入

时间:2016-07-22 09:41:02

标签: php jquery

我在http://bootsnipp.com/snippets/OeZkZ#comments

中创建了一个动态表格行

我在使用循环插入数据库时​​遇到问题。

第一行是将字段作为其0 var

{                                                  1                                                                                                                                                                                                                                                                               }

$count = 1;
if(isset($_POST['byMonth']))
{
for( $i = 1; $i <= $count; $i++ )
{
	
  $year = $_POST['year'.$i];
    $month = $_POST['month'.$i];
     $actual = $_POST['amount'.$i];
      
	  //$date = $_POST['entry'.$i];
  echo $que = "insert INTO worker_by_month(uid,year,month,actual_amount,date) VALUES ('".$uid."','".$year."','".$month."','".$actual."','".$entry."')";
 $mysqli->query($que);
  $count = $_POST['items'];

}
 

}

this is what i have done.

0 个答案:

没有答案