Welcome to the Linux community forum and interact with 2 million technical staff. 1. Configure MySQL1 in php, and set php_mysql.dll in the php installation directory and libmysql In the MySQL installation directory. copy the dll file to c: windowssystem32; 2. Configure php. iniextensionphp_gd2.dllextensionphp_mbstring.dllextens
Welcome to the Linux community forum and interact with 2 million technical staff> 1. Configure MySQL in php 1. Set php_mysql.dll in the php installation directory and libmysql In the MySQL installation directory. copy the dll file to c:/windows/system32; 2. Configure php. ini extension = php_gd2.dll extension = php_mbstring.dll extens
Welcome to the Linux community forum and interact with 2 million technicians>
I. Configure MySQL in php
1. Copy the php_mysql.dll and libmysql. dll files in the php installation directory to c:/windows/system32;
2. Configure php. ini
Extension = php_gd2.dll
Extension = php_mbstring.dll
Extension = php_mysql.dll
Extension = php_mysqli.dll
Put the four above. Remove the front of the dll.
II. Implementation of php form submission to database
1. login. php page
2. add. php page
Include ("conn. php ");
?>
If (isset ($ _ POST ["submit"])
{
$ SQL = "insert into users (username, email) values ('$ _ POST [username]', '$ _ POST [email]')";
Mysqli_query ($ conn, $ SQL );
Echo "added successfully ";
}
?>
3. conn. php page
$ Conn = new mysqli ("localhost", "root", "159357 ");
$ Conn-> select_db ("db_test ");
// Mysql_query ("set name 'gb2312 '");
$ Conn-> set_charset ("utf8 ");
?>