PHP Classes

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

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-10 (8 months ago) RSS 2.0 feedStarStarStar 45%Total: 686 All time: 4,750 This week: 43Up
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: 14391 in Norfolk Island Norfolk Island
Week rank: 164 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 (3)  
File Role Description
Files folder imageclass (2 files)
Accessible without login Plain text file index.php Example Example script

  Files folder image Files (3)  /  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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:686
This week:0
All time:4,750
This week:43Up
User Ratings User Comments (1)
 All time
Utility:65%StarStarStarStar
Consistency:65%StarStarStarStar
Documentation:-
Examples:65%StarStarStarStar
Tests:-
Videos:-
Overall:45%StarStarStar
Rank:3334
 
Mix various versions of php.
9 years ago (keran)
0%Star