<html>
<head>
<title>INSERT INTO test</title>
</head>
<body>
<?php
error_reporting(E_ALL & ~ E_NOTICE);
if(isset($_POST["add"])){
//设置服务器的连接信息
$servername="localhost";
$username="root";
$password="admin";
$dbname="test";
//连接数据库
$conn=mysqli_connect($servername,$username,$password,$dbname)or die(mysqli_error());
mysqli_set_charset($conn,utf8);
if(!get_magic_quotes_gpc()){
$firstname=addslashes($_POST['firstname'
PHP 基于mysqli面向过程的数据库插入实例
最新推荐文章于 2022-11-08 07:47:08 发布