更新时间:2023-01-12 14:18:08
tot = total + 1;
s =
_POST [' a'];
require(' connect.php');
全球
<?php
$tot="total+1";
$s=$_POST['a'];
require('connect.php');
global $pdo;
foreach($s as $value)
{
$stmt=$pdo->prepare("INSERT INTO atten (total) VALUES(:a) where roll=?");
$stmt->bindParam(':a',$tot);
$stmt->bindParam(1,$value);
$stmt->execute();
}
if($stmt==null)
{
die("error".print_r($stmt->errorinfo()));
}
else
{
print_r($stmt);
echo"your attendence sucessfully update";
}
$pdo=null;
?>
please help to insert data into database
tot="total+1";
s=
_POST['a']; require('connect.php'); global