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 (3 days ago) RSS 2.0 feedStarStarStar 48%Total: 671 This week: 4All time: 4,808 This week: 89Up
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

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:671
This week:4
All time:4,808
This week:89Up
User Ratings User Comments (1)
 All time
Utility:68%StarStarStarStar
Consistency:68%StarStarStarStar
Documentation:-
Examples:68%StarStarStarStar
Tests:-
Videos:-
Overall:48%StarStarStar
Rank:2550
 
Mix various versions of php.
8 years ago (keran)
0%Star