I know the rule: never hardcode your password, and I've seen this question here which explains what to with Java and mySQL, but I don't know what to do for PHP and mySQL.
The current connection string is made like this
<?PHP
$DBName = "dbName";
$Host = "localhost";
$User = "dbUser";
$Password = "Yikes_hardcoded_PW";
$Link = mysql_connect( $Host , $User , $Password , $DBName);
if (!$Link) {
die('Could not connect: ' . mysql_error());
}
?>
- but I need to have the password secured, ie not hardcoded in this file. How do I do it?
EDIT: For all the downvotes I getting on this, I still have not received a reply to the question which is about a genuine security concern - hardcoded passwords. It is not helpful to down vote on a genuine question without posting either a comment or answer that fulfils the question.