📜  如何将表单连接到数据库 - Html 代码示例

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

代码示例5
$con = mysqli_connect('localhost', 'root', '',’db_contact’);
The “db_contact” 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'];