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

Recommend this page to a friend!
  Info   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-06-17 (10 months ago) RSS 2.0 feedNot enough user ratingsTotal: 1,697 All time: 2,298 This week: 266Up
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: 168021 in Pakistan Pakistan
Week rank: 588 Up14 in Pakistan Pakistan Up


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

//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 :)

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

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,298
This week:266Up
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.