Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

logins

Status
Not open for further replies.

mettodog

Vendor
Jul 11, 2000
94
US
What is the best way for creating a multi-user (100+) login website, with each login controlling a part of the member page (a "Welcome Bob!" thing, for example)? PHPLib?

Thanks,
James
 
Simple:

Just have a mySQL databaes called users and in there, have 3 different fields, an id, name, and password field.

Then, have a form so that the user can log into your site and display whatever message you wish to display.

When the user click the login button, you can run a PHP script to validate the username and password, and if it is the correct one, display whatever information you wish, if not, then alert them that they are not using the correct username and password.

Once they are logged in, start a session so that you don't have to pass around all of the variables to keep the user logged in if they wish to view different parts of your site.

Then, when the user logs out, destroy the session.

I would suggest you encrypt the password using the [tt]md5()[/tt] function in PHP.

It uses the md5 algorithm for encrypting the password so that your page will be a little more secure.


Hope this helps,

-Vic vic cherubini
vikter@epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
====
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top