Login and DB classes quick start: Authenticate users with records in MySQL database

Recommend this page to a friend!
  Info   View files (12)   Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-06-17 (1 month ago) Not enough user ratingsTotal: 1,670 All time: 2,335 This week: 261
Version License PHP version Categories
database_quickstart 0.01Free for non-comm...4.0Databases, User Management
Description Author

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

It takes the user name and password of an authenticating user against user records in a MySQL database.

The class can setup session variables and update the last login date if the user was authenticated successfully.

Picture of raja
Name: raja <contact>
Classes: 1 package by
Country: Pakistan Pakistan
Age: ???
All time rank: 169121 in Pakistan Pakistan
Week rank: 713 15 in Pakistan Pakistan

/////////////  /////////////  /////////////  /////////////  

//Login and Database Access class.
//Developed by Khadim Naby , Modified by Raja Shahzad Naveed.

Discription: This package contains login class and database operations classes.
code samples have been provided for different database queries(insert,delete,update,select).
some usefull functions included in the package are :

function GetUSStatesArray($AddSelect=true);
function createRandomPassword();
function ValidEmail($email);
function GetDuration($TimeGivenInSecands,$time=true,$valueTbc='2');
function GetScriptName();
function GetFileName();
function StartSessionIfNot();
function RedirectTo($URL,$AndExit=true);
function GetServerName();
function GetHostName();
function GetCurrenURL();
function GetReferer();
function GetFormGet($VarName);
function GetIP();

Steps To Setup up the Class.
1- Change the config.php according to your Server Configurations.

2- Setup your "login table" and "Query to your table" in 

3- PreSqlFunctions.php and EasyFunctions.php contains some commenly 
used functions (check them out , they might help in developement)

4- defaultFunx.php contains code samples for select, update, delete and insert 

5- Last change :make a folder "includes" where ur all files are , and cut and paste
following fiels in to it .


or change all the Includes in the remaining files :)

File Role Description
agentLogin.class.php Class Login Class , all login functionality is in it ,
config.php Conf. DB config File
dbConnection.php Aux. database connection
defaultFunx.php Aux. select , insert , delete , update , functions Templates
EasyFunctions.php Aux. GetScriptName, GetFileName, RedirectTo, GetServerName, GetHostName, GetCurrenURL,GetIP etc etc etc
login.php Aux. Login form
LoginCheck.php Aux. little login check after form post
LoginProcess.php Example LoginProcess (varification from DB)
logout.php Aux. Simple logout (Session Destroy)
PreSqlFunctions.php Aux. Some other usefull functions (GetDuration,ValidEmail, createRandomPassword, GetUSStatesArray etc etc )
ReadMe.txt Doc. Read It , MUST , very must :)
SqlFunctions.php Aux. functions that execute different Database queries

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,335
This week:261
User Comments (1)
Thats a good php package / class !! loool This is great !! lo...
12 years ago (Josť Filipe Lopes Santos)

For more information send a message to info at phpclasses dot org.