Is it safe to include the db username, pass, db name in the code? Or is it better to have it in a separate file that can only be viewed by certain users?
I am worried that it is not safe and anyone can access my db.
What do you think?
$connect=mysql_connect("localhost","dbuser","dbpass");
mysql_select_db("dbname",$connect) or
die (mysql_errno().":<b> ".mysql_error()."</b>");
I am worried that it is not safe and anyone can access my db.
What do you think?
$connect=mysql_connect("localhost","dbuser","dbpass");
mysql_select_db("dbname",$connect) or
die (mysql_errno().":<b> ".mysql_error()."</b>");