我在用php+mysql进行表单提交时遇到这个错误,
Error: INSERT INTO artikel VALUES ('aa', 'aa', '2018-06-24')
Column count doesn't match value count at row 1
发件人:
<form method="post" name="posting_form" action="submit.php">
Judul Artikel<br>
<input type="text" name="judul_artikel" size="30"><br>
Isi Artikel<br>
<textarea name="isi_artikel" cols="60" rows="10"></textarea><br>
<input type="submit" name="submit" value="submit artikel">
</form>
$judul = $_POST['judul_artikel'];
$isi = $_POST['isi_artikel'];
$tgl = date('Y-m-d');
$sql = "INSERT INTO artikel VALUES ($judul, $isi)";
if ($koneksi->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $koneksi->error;
}
?>
这个错误是什么意思?
暂无答案!
目前还没有任何答案,快来回答吧!