Click to See Complete Forum and Search --> : PHP - Login & Password

04-19-2001, 04:29 AM
I know this has nothing to do with XML, but I thaught i'd post it here considiering the only other developemnt threds are for HTML and Flash.
I want to setup a login and password system on a website. For multiple users, to have access to one directory. It has been sugessted to me that PHP is the best way of doing it. I don't know much at all about PHP, but what do u guys think? Do you know of any php development sites (apart from the main ones) with tutorials??? Mabaey flashkit.com should make phpkit.com! hehe... Any sugesstions?

04-19-2001, 05:16 AM
well, you can of course do this with PHP (and I don't know any good development sites - sorry :) but it might be overkill depending on exactly what specifications you have.

if the site is running on a host running UNIX, you can put two little files in the directory you want to protect, which hold the userid/password information. They are called .htaccess and .htpasswd, just do a search on the web, there's loads of stuff about it out there

when someone requests a document in that directory, a browser alert box pops up (you can customise the message it displays) and prompts for a user id and password.

not too pretty but it might be enough for what you want and is extremely easy to do...

hope this helps - n.

04-19-2001, 12:43 PM

if you want to assume the responsibility of admin, you can use one PHP script to sign up a new user, which will add their name to a table in MySQL (or ODBC compliant DB), and then have another PHP script resident on all pages w/in a subdirectory, checking that the user has rights to see that page (or directory). I use this method on some of my sites, and it's pretty good (PHP is powerful yet can be easy when boiled down to its most basic of applications). Use the URLs below to get started.



04-19-2001, 09:09 PM
Thanks guys!
Looks like I have some reading to do..
Ill get back to you on what happens at the end!