$marka = $_POST['marka'];
$model = $_POST['model'];
$godiste = $_POST['godiste'];
$cena = $_POST['cena'];
$query = "INSERT INTO `auto` (`id`, `marka`, `model`, `godiste`, `cena`) VALUES (NULL, '$marka', '$model', '$godiste', '$cena');"
if(mysqli_query($connection,$query)) {
echo "New record created";
} else {
echo "Error: " . $query . "<br>" . mysqli_error($connection);
}
我無法找到是什麼問題就在這裏:mysqli_query插入不起作用
Parse error: syntax error, unexpected 'if' (T_IF) in C:\wamp\www\autoplac\forma.php on line 16
雙cuote放了'AFTER;'$查詢後'=「INSERT INTO汽車(ID,馬爾卡,模型,godiste,以上的價格)VALUES(NULL,「$ marka','$ model','$ godiste','$ cena');'' – developer
Okaay,這是尷尬失敗..謝謝大家.. – BanDox