For my very small website that only friends know of, I am developing a password system. I am saving the passwords in a php file like this.
<?php
if($_GET["p"]=="password"){
?>
user1 password1
user2 password2
<?php
}
?>
Then, I can read the password with file_get_contents(pass.php?p="password"); And I can still write the password by writing to the php file just like I would a text file. Is this method insecure? Are there similar methods that are that do not require a database? I don't think my site needs encryption, it wouldn't hurt too much if the passwords were compromised.