欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 一、php配置MySQL 1、将php安装目录下的php_mysql.dll和MySQL安装目录下的libmysql.dll文件拷贝至c:/windows/system32中; 2、配置php.ini extension=php_gd2.dll extension=php_mbstring.dll extens
欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入
一、php配置MySQL
1、将php安装目录下的php_mysql.dll和MySQL安装目录下的libmysql.dll文件拷贝至c:/windows/system32中;
2、配置php.ini
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_mysqli.dll
把上面四个。dll的最前面的;去掉
二、php表单提交至数据库的实现过程
1、login.php页面
2、add.php页面
include("conn.php"); ?>
if(isset($_POST["submit"])) { $sql = "insert into users(username, email) values('$_POST[username]', '$_POST[email]')"; mysqli_query($conn, $sql); echo "添加成功"; } ?>
3、conn.php页面
$conn = new mysqli("localhost", "root", "159357"); $conn->select_db("db_test"); //mysql_query("set name 'gb2312'"); $conn->set_charset("utf8"); ?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver Mac version
Visual web development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools
