This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
inside/inside/credentials-sample.php
T
2009-10-13 15:43:04 +02:00

28 lines
815 B
PHP

<?php
// Retrieve the data source name for connecting to the MySQL server and
// selecting the sampdb database using our top-secret name and password
// To use the original MySQL module, $driver should be "mysql".
// To use the "MySQL improved" module, $driver should be "mysqli".
// This function is bloated to be able to use the same version on different servers.
function getDSN($host = "default") {
if ($host == "default" || $host == "dns") {
$host_name = "localhost";
$driver = "mysql";
$user_name = "USERNAME";
$password = "PASSWORD";
$db_name = "DATABASE";
}
else
if ($host == "forum") {
$host_name = "localhost";
$driver = "mysql";
$user_name = "USERNAME";
$password = "PASSWORD";
$db_name = "DATABASE";
}
return "$driver://$user_name:$password@$host_name/$db_name";
}
?>