You are here: Re: Simplest scheme for password protection? « PHP Programming Language « IT news, forums, messages
Re: Simplest scheme for password protection?

Posted by Ron on 10/23/06 18:00

<laredotornado@zipmail.com> wrote in message
news:1161622661.162877.145300@e3g2000cwe.googlegroups.com...
> Hello,
>
> I'm using PHP 4.4.4 with MySQL 5.0. I have a USERS table wher I store
> a username and password for each user. I have a directory (containing
> both HTML and PHP files) that I would like only logged in users to
> access. What is the simplest scheme for password protecting thsi
> directory? I would prefer not to touch every page and add access
> control logic, but if that's the easiest way, so be it.
>
> Your thoughts are greatly appreciated. - Dave

Dave,
if your server supports it you could use .htaccess files (apache style) to
control user access.
otherwise you can write a simple access control system and make it a
require_once in each PHP file.

Only the .htaccess will protect the html files on their own, It is often
useful to put pages and fragments that you don't want users to discover in
directories outside of the browsing path of the user, then get PHP to
include or require them as needed.

Cheers

Ron

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация