Login   Register  
PHP Classes
elePHPant
Icontem

File: db.inc.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andrei  >  SMK User Authentication  >  db.inc.php  >  Download  
File: db.inc.php
Role: Configuration script
Content type: text/plain
Description: Configuration script. Adjust to your Mysql configuration
Class: SMK User Authentication
Authenticate users with MySQL database records
Author: By
Last change: Added new option: _TIMEOUT_ABSOLUTE that determines if the session timeout is relative to the logintime, or -if not defined- to the last activity of the user (page reload)
Date: 8 years ago
Size: 780 bytes
 

Contents

Class file image Download
<?php
    $db_config
['server']='localhost';
    
$db_config['database']='test';
    
$db_config['user']='root';
    
$db_config['pass']='';
   
    
define ('_DEFAULT_TIMEOUT',1800); //Session timeout minutes
    # 
    # If this constant is defined, then the Timeout behaves 
    # relative to the logintime. that means if you login now,
    # regardeless to your amount of activity you will be 
    # timed out in _DEFAULT_TIMEOUT minutes.
    # If this is not your intension 
    # just comment out the following line.
    
    
define ('_TIMEOUT_ABSOLUTE',1); 
    
    require_once (
'database.php');
    
$database = new database$db_config['server'],
                 
$db_config['user'], $db_config['pass'], $db_config['database'],
                  
'' );    
?>