Web Hosting Talk







View Full Version : PHP / MySQL Login


Bilco105
07-03-2005, 06:14 PM
Hello, Im trying to make a login page for people to login and ger redirected to a directory that only people who are logged in can see. I would like to use a mysql database to hold user accounts and passoword information. how should I go about setting up the database and then coding the php login panel? any help is great! thanks!

OIS
07-03-2005, 08:47 PM
You might want to check out PEAR::Auth (http://pear.php.net/package/Auth/). The sample code given in the tutorial (http://pear.php.net/manual/en/package.authentication.auth.intro.php) should be sufficient for your purposes.

phab
07-04-2005, 06:34 AM
I wrote something like this two weeks ago. Users have to login with username and password, the data is stored in a mySQL database.
If the login works, they will get redirected to a page/directory, otherwise they will get redirected to the login page.

I used sessions for this.

azizny
07-04-2005, 10:11 AM
Use this as a starting point:

http://www.free-php-scripts.net/download_script.php?id=8

Peace,