Postingan lainnya
Error di you have an error in your sql syntax; check the manual that corresponds....
Error nya bilang "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '','002','As','X-1','RPL','70','80','90','80')' at line 1"
Tolong solusi dan koreksinya kak, ini scriptnya :
Ini Di file prosesnya :
<?php
include('../koneksi.php');
$guru = $_POST['id_guru'];
$mapel = $_POST['id_mapel'];
$nis = $_POST['nis'];
$kelas = $_POST['id_kelas'];
$jurusan = $_POST['id_jurusan'];
$uh = $_POST['uh'];
$uts = $_POST['uts'];
$uas = $_POST['uas'];
$na = ($uh + $uts + $uas)/3;
$query = mysqli_query($koneksi, "insert into nilai values('',$guru','$mapel','$nis','$kelas','$jurusan','$uh','$uts','$uas','$na')") or die (mysqli_error($koneksi).$query);
if ($query) {
echo "<script>alert('Proses Berhasil! Silahkan Menuju Admin')</script>";
echo "<meta http-equiv='refresh' content='0 url=home.php'>";
}
?>
Terimakasih :) ^^
0