我正在开发一个两天前尝试过的实时系统,我重新设计了它,但现在帖子没有插入 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')");