I've seen in some cases developers that use the encryption key, from the config.php, to hash passwords and store them in database. I was wondering is it better to do it this way, or better by creating a random salt (for example in a function) each time?
Well I guess in the first case you don't have to store (and) the salt in the database, but is it secure enough and what if there's a match with passwords?