Question regarding the most secured way to have your connection file (ie: connect_to_mysql.inc) coded.
some set their codes with this:
DEFINE (DB_USER, "username");
DEFINE (DB_PASSWORD, "password");
DEFINE (DB_HOST, "localhost");
DEFINE (DB_NAME, "database_name");
$db_connection = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD);
and some use this:
<?php
$link = mysql_connect("localhost", "user", "password")
or die("Could not connect: " . mysql_error());
print ("Connected successfully");
mysql_close($link);
?>
What is the most secured and the best way to code a connection to MySQL and