MySQL - Connecting PHP to Database
This chapter provides tutorial notes on connecting PHP scripts to MySQl servers. Topics include creating database connection objects; executing INSERT INTO, SELECT, and UPDATE statements from PHP scripts.
These sections are omitted from this Web preview version. To view the full content,
see information on how to obtain the full version this book.
php_mysqli.dll - Configuring PHP MySQL Extension
Commonly Used MySQL Functions
mysqli_connect() - Creating MySQL Connections
Turning off "caching_sha2_password" on MySQL
INSERT INTO - Inserting New Records
SELECT - Running Database Queries
UPDATE - Modifying Database Records
- Connect PHP scripts to MySQL server requires the PHP MySQL extension.
- The default MySQL extension is changed from php_mysql.dll to php_mysqli.dll
between PHP 5 and PHP 7.
- php_mysqli.dll in PHP 7 can not support "caching_sha2_password" authentication
method offered on MySQL 8.
- You can change the MySQL server user authentication method
from "caching_sha2_password" to "mysql_native_password" to allow php_mysqli.dll
extension to continue to work.
Table of Contents
About This Book
PHP Installation on Windows Systems
Integrating PHP with Apache Web Server
charset="*" - Encodings on Chinese Web Pages
Chinese Characters in PHP String Literals
Multibyte String Functions in UTF-8 Encoding
Input Text Data from Web Forms
Input Chinese Text Data from Web Forms
MySQL - Installation on Windows
►MySQL - Connecting PHP to Database
MySQL - Character Set and Encoding
MySQL - Sending Non-ASCII Text to MySQL
Retrieving Chinese Text from Database to Web Pages
Input Chinese Text Data to MySQL Database
Full Version in PDF/EPUB