Login   Register  
PHP Classes
elePHPant
Icontem

File: DB_INFO.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kevin Cadman  >  Authentication  >  DB_INFO.php  >  Download  
File: DB_INFO.php
Role: Configuration script
Content type: text/plain
Description: Database connection setup
Class: Authentication
A session and cookie based authentication class
Author: By
Last change:
Date: 2003-07-31 08:54
Size: 743 bytes
 

Contents

Class file image Download
<?PHP
/*
This file is used for Database Setup.
Pretty self explanitary, replace the values below with your corresponding mySQL values.

Note!
The "table name" is defined in the Authentication.php class.
*/
    
require_once 'DB.php';
     
$username "USERNAME"// Put your username here
     
$password "PASSWORD"// Put your password here
     
$host "HOST"// Put the IP address or hostname of your mySQL server here.
     
$db_name "DATABASE"// Put your database name here.
     
$dsn "mysql://$username:$password@$host/$db_name";
     
$db DB::connect($dsntrue);
     
$db->setFetchMode(DB_FETCHMODE_OBJECT);
        if (
DB::isError($db)) {
            die (
$db->getMessage());
        }
    global 
$db;
?>