PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of kz  >  Login Class Fast Site  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Login Class Fast Site
Register and login users stored in MySQL
Author: By
Last change: Update of index.php
Date: 10 months ago
Size: 1,016 bytes
 

Contents

Class file image Download
<?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>

For more information send a message to info at phpclasses dot org.