我希望使用此代码通过单个查询插入多达50行,如何通过使用数组或使用循环
先谢谢
<?php
require 'conn/Session.php';
require 'conn/MySQL.php';
require_once("includes/generalFunction.php");
require_once("classes/class.SiteManager.php");
$dbcon = new MySQL();
$siteObj = new SiteManager();
require 'conn/checkSession.php';
if($_POST['submit'])
{
$content=array("student_id"=>$_POST['student_id'],"parent_id"=>$_POST['parent_id'],"student_name"=>$_POST['student_name'],"s_status"=>$_POST['s_status'],"class"=>$_POST['class'],"section"=>$_POST['section']);
$dbcon->insert_query("tbl_attandence",$content);
$mess="Record created successfully.";
$url="all_attandence.php?mess=".base64_encode($mess);
redirectPage($url);
}
?>