diff options
Diffstat (limited to 'config.php.example')
-rw-r--r-- | config.php.example | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/config.php.example b/config.php.example new file mode 100644 index 0000000..5057641 --- /dev/null +++ b/config.php.example @@ -0,0 +1,17 @@ +<?php +// Example config.php +/* Database credentials. Assuming you are running MySQL +server with default setting (user 'root' with no password) */ +define('DB_SERVER', 'hostname'); +define('DB_USERNAME', 'username'); +define('DB_PASSWORD', 'password'); +define('DB_NAME', 'dbname'); + +/* Attempt to connect to MySQL database */ +$link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); + +// Check connection +if($link === false){ + die("ERROR: Could not connect. " . mysqli_connect_error()); +} +?> |