NYCPHP Meetup

NYPHP.org

[nycphp-talk] login window snippet

Mitch Pirtle mitchy at spacemonkeylabs.com
Sat Apr 24 09:53:16 EDT 2004


leam wrote:
> I'm setting up an editor so the site owner can write his own web pages. 
> I'm trying to move slowly because any of this seems likely to open op a 
> security hole and it's a shared host. I don't wanna make any mistakes.
> 
> Anyone have a login (log in, log-in) snippet that will protect this one 
> page? The site does have mysql so I can use a user table if needed.

Please see PEAR::Auth:

http://pear.php.net/manual/en/package.authentication.php

This will quickly protect your one page, and can easily scale to cover 
the entire website.  Will support logins stored in a database table, 
flatfile, you name it.

Code comes with examples, and is adequately documented.

-- Mitch



More information about the talk mailing list