if (isset($_POST['submit'])){
$sql_insert_data = "INSERT INTO games (title, my_platform, genre, type, release_date, publisher, developer, metacritic, "
. "completed, dlc_extensions, achievements_support, 100_achievements) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)";
$result_insert_data = $connect->query($sql_insert_data);
$secure_insert = mysqli($sql_insert_data);
$secure_insert->bind_param(
'xyz',
$_POST['title'],
$_POST['my_platform'],
$_POST['genre'],
$_POST['type'],
$_POST['release_date'],
$_POST['publisher'],
$_POST['developer'],
$_POST['metacritic'],
$_POST['completed'],
$_POST['dlc_extensions'],
$_POST['achievements_support'],
$_POST['100_achievements']
);
$secure_insert->execute();
echo "Inserted"
} else {
echo "Something is wrong";
}
大家好我是新來的,所以請耐心等待。我不知道如何解決這個問題。錯誤如下:PHP&MySQL插入數據錯誤
Fatal error: Uncaught Error: Call to undefined function mysqli() in C:\xampp\htdocs\Games_Project_List\index.php:91 Stack trace: #0 {main} thrown in C:\xampp\htdocs\Games_Project_List\index.php on line 91
感謝您提前的幫助。
'bind_param('xyz'...繼續前進'和'xyz'表示什麼? –
你的'echo「有什麼不對勁」;'在這裏沒有幫助你 –
'$ secure_insert = mysqli'這是不正確的方法 –