参考:https://blog.youkuaiyun.com/fangkang7/article/details/83684228【PhpStorm】如何连接MySQL数据库
一直很苦恼,为什么我用php写的留言板,不能从html的用php传输到mysql里呢?用了三天时间,查百度,谷歌,还有图书馆图书,至今还没有处理完这个问题。继续探索……
参考:https://blog.youkuaiyun.com/lynxzong/article/details/12194247 如何从数据库调出数据显示到页面 PHP+Mysql+Html(简单实例)
从上面这个文章里面,我得到了一个网页,一个php代码在html里面的文件。
上述网页代码更新如下 :这里有坑
<!DOCTYPE html> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <table> <caption>留言内容</caption> <tr> <th>编号</th> <th>用户</th> <th>标题</th> <th>内容</th> <th>发表时间</th> </tr> <