PHP Classes

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

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2008-05-02 (7 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,611 This week: 1All time: 2,313 This week: 1,128Up
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: 164721 in Pakistan Pakistan
Week rank: 916 Up18 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  
 0%Total:1,611All time:2,313
 This week:1This week:1,128Up
 User Comments (1)  
Thats a good php package / class !! loool This is great !! lo...
7 years ago (Josť Filipe Lopes Santos)