1, define global variables:
We put the file in a separate script, which is relatively convenient.
Config.php
PHP
$ db_server = "localhost"; // server name
$ db_name = "mysql"; // Database name
$ db_username = "root"; // user name
$ db_userpassword = ""; // User password
$ TABLE = "Table"; // Name of the table in the database
?> During connection with the database, you need to define some global variables, saved as separate files, when calling, use Require ("") or include (");
The benefits of doing this are to be more convenient to call and change later.