PHP Classes

File: DB_INFO.php

Recommend this page to a friend!
  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: 14 years ago
Size: 743 bytes


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

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($dsn, true);
        if (
DB::isError($db)) {
            die (