PHP Classes
elePHPant
Icontem

MySQL Login: Authenticate users with records in a MySQL table

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2005-10-27 (9 years ago) RSS 2.0 feedStarStar 37%Total: 3,777 All time: 808 This week: 1,029Down
Version License Categories  
mysql_login 1.0GNU General Publi...Databases, User Management
Description Author  

This class can be used to authenticate users with records stored in a MySQL database table.

It features:

- Customization of the table and the fields to lookup to verify the existence of an account and the respective password
- A session variable is always set whether or not the user authenticated correctly
- Customize the URL of pages to redirect when the user is granted or denied

Picture of Peter
Name: Peter <contact>
Classes: 1 package by
Country: Denmark Denmark
Age: ???
All time rank: 7727 in Denmark Denmark
Week rank: 1531 Down8 in Denmark Denmark Down

Details provided by the author  
readme.txt

1. description
2. example
3. license
4. author

1. description
=================================

MySQL Login is a class that handles logins attempted to mysql servers. It
takes a great deal of parameters and can be modified to suit all the needs
one may have with a login script.. if not? please dont hesitate to contact
me folks..! ;)

2. example
=================================

1.

Run LOGIN.SQL or this code on your mysql server to create a table with 
the default values:

CREATE TABLE `login` (
  `id` int(11) NOT NULL auto_increment,
  `username` text NOT NULL,
  `password` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;


2.

Check example.php.

3.

You must change the variables there to fit your needs:

$mysql_database		// mysql database
$mysql_hostname		// mysql hostname
$mysql_username		// mysql username
$mysql_password		// mysql password

$table_name		// your login table name (login)
$table_username		// field in $table_name with usernames
$table_password		// field in $table_name with passwords
	
$query_username 	// query username
$query_password 	// query password
	
$redirect_accepted	// redirects to this if login is succesful
$redirect_denied	// redirects to this if login has been denied

**** NOTE ****
The script automatically sets a session variable called "loggedin" with
a value of 1 if login was succesful or 0 if login was denied.
**** NOTE ****


3. license
=================================

GNU General Public License (c)

4. author
=================================

Steffen Beck <steffenbeck@hotmail.com>

Contact me through MSN if you have any bugs or comments :)

  Files folder image Files  
File Role Description
Accessible without login Plain text file denied.php Example Example
Accessible without login Plain text file example.php Example example file
Plain text file login.php Class class file
Accessible without login Plain text file login.sql Data Configuration
Accessible without login Plain text file readme.txt Doc. Readme
Accessible without login Plain text file success.php Example Example

 Version Control Unique User Downloads Download Rankings  
 0%Total:3,777All time:808
 This week:0This week:1,029Down
User Ratings User Comments (1)  
 All time
Utility:37%StarStar
Consistency:50%StarStarStar
Documentation:66%StarStarStarStar
Examples:70%StarStarStarStar
Tests:-
Videos:-
Overall:37%StarStar
Rank:2320
 
Excellent
5 years ago (kishore kumar)
80%StarStarStarStarStar