-3
我正在研究兩天前嘗試過的一個實時系統,我重新設計了它,但是現在帖子未插入到MySQL表中。任何人都可以幫忙嗎?提前致謝。MySQL插入表失敗
$con=mysqli_connect("localhost","h26them_live","tpcadmin","h26them_live");
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
mysqli_query($con, "INSERT INTO posts (location, post, date, by) VALUES('$post_location', '$post_field', '$date', '$by')");
你檢查了你的錯誤日誌嗎?你會得到什麼錯誤?你採取了哪些步驟來解決這個問題? –
你會得到什麼錯誤? –