Jump to content
ShoeLace1291

Single Admin Login

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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 by Muddy_Funster

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.