📜  将 html 连接到 mysql 数据库 - Html 代码示例

📅  最后修改于: 2022-03-11 14:52:55.946000             🧑  作者: Mango

代码示例2
$con = mysqli_connect('localhost', 'root', '',’db_connect’);
The “db_connect” is our database name that we created before.
After connection database you need to take post variable from the form. See the below code
$txtName = $_POST['txtName'];
$txtEmail = $_POST['txtEmail'];
$txtPhone = $_POST['txtPhone'];
$txtMessage = $_POST['txtMessage'];