Hello,
I'd like to collect some opinions about the question:
in which data type (variable or constant) it is best to store passwords for a database?
(I'm using PHP/MySQL but the matter should consist for other systems too)
regards
I'd like to collect some opinions about the question:
in which data type (variable or constant) it is best to store passwords for a database?
(I'm using PHP/MySQL but the matter should consist for other systems too)
Code:
// connecting to DB mysqli_connect($host, $user, $pw); unset($pw); // vs. mysqli_connect(HOST, USER, PW);
- on the one hand side constants can never be altered in the script and they are (in most cases) globally available.
- on the other hand side, I can destroy a variable's value after I used it. (you know, global variables are evil... *g*)
regards
Comment