1 回答
TA贡献1828条经验 获得超4个赞
,你的查询中有一个额外的,你可以删除它,你的代码看起来像下面的代码..
<?php
$conn = mysqli_connect('localhost','root', '','dsolo');
// Check connection
if (!$conn)
{
die("Connection failed: " . mysqli_connect_error());
}
else
{
$id = $_POST['id'];
$bulan = $_POST['bulan'];
$gajipokok = $_POST['gajipokok'];
$totalbonus = $_POST['totalbonus'];
$potongan = $_POST['potongan'];
$totalgaji = $_POST['totalgaji'];
$pajak = $_POST['pajak'];
$tes="INSERT INTO gaji set id='$id', bulan='$bulan', gajipokok='$gajipokok', totalbonus='$totalbonus',potongan='$potongan', totalgaji='$totalgaji', pajak='$pajak'";
mysqli_query ($conn,$tes) or die ($tes);
}
?>
- 1 回答
- 0 关注
- 147 浏览
添加回答
举报