我在将我的数据插入数据库时遇到问题,通常如果出现问题,它会显示错误,但这个没有显示错误(我不知道这是否算作错误,因为我还是这个 php 编码的新手)
<?php
/*proses*/
$conn = mysqli_connect('localhost','root', '','dsolo');
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$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);
?>
在我按下保存后显示的是这个
INSERT INTO gaji set id='yuki', bulan='2019-08', gajipokok='2000000', totalbonus='2000000', potongan='1000000', totalgaji='3000000', pajak='300000',
我需要在代码中更改什么?
明月笑刀无情