Where is the safest place to add MySQL database connection information when connecting through a PHP script?
$connection = mysql_connect($hostname, $username, $password); if (!$connection) {die('Could not connect: ' . mysql_error());} mysql_select_db($database, $connection);
I know that it is not recommended to place them directly in the script that queries the database. However, some say that you should put the connection data in a separate PHP script and include the script for the connection.
Is there a safer place to post connection information?
source share