The following is some guidance on just how to fill in the parameters for your phpdig database connection script, connect.php. You'll note that there are five parameters to be defined:
Code:
define('PHPDIG_DB_PREFIX','<dbprefix>');
define('PHPDIG_DB_HOST','<host>');
define('PHPDIG_DB_USER','<user>');
define('PHPDIG_DB_PASS','<pass>');
define('PHPDIG_DB_NAME','<database>');
The username and password (PHPDIG_DB_USER and PHPDIG_DB_PASS, respectively) are under your control. Pick whatever you want for these values, but make sure they agree with the username and password that were setup when you defined your phpdig database.
For the remaining parameters, the easiest way to tell what they should be is to look at what shows up on phpMyAdmin, on your web host's control panel. Here's one example:
Code:
Database prefixname_phpdigdb running on localhost
There are three parts to this message:
1) The database has a prefix called prefixname
2) phpdigdb is the database name
3) The MySQL database is running on localhost, meaning that it is running on the same server as your website
Hence, your connect.php file would be set like so for the following variables:
Code:
define('PHPDIG_DB_PREFIX','prefixname');
define('PHPDIG_DB_HOST','localhost');
define('PHPDIG_DB_NAME','phpdigdb');
Here is another example:
Code:
Database phpdigdb running on sql02.server25.host.com
The above message tells you:
1) There is no database prefix
2) phpdigdb is the database name
3) The MySQL database is running on a server called:
sql02.server25.host.com
Hence, your connect.php file would be set like so for the following variables:
Code:
define('PHPDIG_DB_PREFIX','');
define('PHPDIG_DB_HOST','sql02.server25.host.com');
define('PHPDIG_DB_NAME','phpdigdb');
Questions, comments and suggestions are welcome.