ShoeLace1291 Posted May 7, 2015 Share Posted May 7, 2015 I am in the process of developing my personal website. There will not be any member accounts, but I will still need to have an admin panel so that I can manage my content. I will be the only person using the admin panel. Without using a database table to store it, what would be the most secure way to store a single admin password that I can use to login to my admin panel? Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted May 7, 2015 Share Posted May 7, 2015 (edited) As it will only be you, and you will - I assume - be able to change the code in the php pages, hardcode the hash of your password in the pages cose and just use that to verify your entered password. Change the stored hash whenever you want to change the password. an example that uses the hash function in my sig: $pwd = $_POST['password']; $pwdHash = makePass($pwd); if($pwdHash == 'String Stored from previously running chosen password through the makePass function'){ //load admin console } else{ //show password failure } obviously the 'String Stored....function' would be the actual hash from running your password through the function, and not a human friendly string like that. Edited May 7, 2015 by Muddy_Funster Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.