PHP Classes

Login Class Fast Site: Register and login users stored in MySQL

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-10 (2 months ago) RSS 2.0 feedStarStarStar 45%Total: 676 This week: 1All time: 4,790 This week: 571Up
Version Licenses PHP version Categories
login-fast-site 1.9Free For Educatio...5.0HTML, PHP 5, Databases, User Management
Description 

Author

This class can be used to register and login users stored in MySQL.

There is a database access class that can perform common operations to store and retrieve information from a MySQL database.

The main class takes an object of the database access class to perform several operations to manipulate records of registered users.

Currently it can display forms to register or login users, create new user records, and authenticate users with user name and password.

Picture of kz
  Performance   Level  
Name: kz <contact>
Classes: 5 packages by
Country: Norfolk Island Norfolk Island
Age: 25
All time rank: 14471 in Norfolk Island Norfolk Island
Week rank: 420 Up1 in Norfolk Island Norfolk Island Equal

Example

<?php
    error_reporting
(E_ALL);
   
session_start();
    include
'class/MyDB.class.php';
    include
'class/login.php';
   
$db_host = 'localhost';
   
$db_database = 'login';
   
$db_login = 'login_user';
   
$db_password = 'y2QzuTy3YwmG35y5';
   
$db = new MyDB($db_host, $db_login, $db_password, $db_database);
    if (
$db->Connect() == false) {
        echo(
'brak połączenia z bazą danych');
    }
   
$db->Query('SET NAMES UTF8') or die($db->GetLastError());
   
$login = new login($db);
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
           
if($login->isLoggedIn() == false) {
                echo
$login->loginBox();
            }
            if(
$_GET['logout']) {
               
$login->logout();
            }
            if(
$_GET['register']) {
                echo
$login->registerBox();
            }
            echo
$login->_debug();
       
?>
</body>
</html>


  Files folder image Files  
File Role Description
Files folder imageclass (2 files)
Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  class  
File Role Description
  Accessible without login Plain text file login.php Class Class source
  Accessible without login Plain text file MyDB.class.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:676
This week:1
All time:4,790
This week:571Up
User Ratings User Comments (1)
 All time
Utility:65%StarStarStarStar
Consistency:65%StarStarStarStar
Documentation:-
Examples:65%StarStarStarStar
Tests:-
Videos:-
Overall:45%StarStarStar
Rank:3262
 
Mix various versions of php.
9 years ago (keran)
0%Star