ddhr.org
PHP password protection (2) Wednesday, May 25, 2005 9:33 am

I found this awesome script at PHPBuddy that allows you to password protect a PHP page with some simple code.  All you need to edit is the username and password, and insert your content after the script.  It uses sessions, so it'll keep you logged in as long as there's a web browser window open.  You must close all web browser windows to log out.  View the source here.

Linked:  Web-based plain text editor

Kyle Stemen Friday, May 27, 2005 2:26 am

What's the adb_password for? I don't see how it could get a value other than null or admin_password. Couldn't you use sesssion_destroy in a logout button?

Dave Friday, May 27, 2005 8:01 am

I'm not really sure.  I didn't write the script; I found it at PHPBuddy.  If you try it, let me know how it comes out.

Hello
Hi, my name is Dave Hosier, and this website is where I write my unfounded opinions on trivial matters. Feel free to look around, but please refrain from reading anything.

about | contact | feed

Comments (feed)
Dave on Wedding investment: Well obviously stay away from...
Rus on Wedding investment: Can you advise us on...
Someone who is not young but not old on Old age pains: Regarding Paragraph 1 Sentence 2,...
Bobby on Blackberry vs. black raspberry: I grew up in Olney,...
Richi near Frankfurt/M. on WinXP .mov thumbnails: Thanks Dude, that solved my...
saphrenne on Strummit From The Summit: I love this song so...
Rosalyne on Blackberry vs. black raspberry: I grew up eating BlackCaps...
BONNIE on Glitter cards: thats awsome... i laugh out...
Christy on WinXP .mov thumbnails: was skeptical at first... Windows...
Wendy on Tony Romo chokes: Have you seen this article...