If you make a software which relies on multiple files connecting to a database, i would place
PHP Code:
$servername = "localhost";
$dbuser = "your_name";
$dbpass = "your_password";
$dbname = "examples";
Along with the connect function and then use a php include in the files which require!