The best way to store username and password without a database
- by Mokuchan
Hello everyone,
I want to build a simple single user login "library" in PHP, but I'm facing the following dilemma: how should I store username and password if I'm not using a database?
A simple plain text file could be easily read and then the password could be easily decripted so that's not an option.
If I create a php file with just
<?php
$Username= "username";
$Password= "password";
?>
then no one should be able to read it and I could simply include this file where I need it, but I'm not really sure you can't find a better way to do this!
So what's, in your opinion, the best solution to this problem (and why)?
Thanks