PHP Classes

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    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,708 All time: 2,297 This week: 491Up
Version License PHP version Categories
database_quickstart 0.01Free for non-comm...4.0Databases, User Management


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: 167821 in Pakistan Pakistan
Week rank: 483 Up13 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 includes\agentLogin.class.php 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 queries. 5- Last change :make a folder "includes" where ur all files are , and cut and paste following fiels in to it . agentLogin.class.php dbConnection.php defaultFunx.php EasyFunctions.php PreSqlFunctions.php SqlFunctions.php 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,297
This week:491Up
User Comments (1)
Thats a good php package / class !! loool This is great !! lo...
14 years ago (Josť Filipe Lopes Santos)