PHP Classes

File: config.php

Recommend this page to a friend!
  Classes of Bharat Parmar   Short Code CRUD   config.php   Download  
File: config.php
Role: Configuration script
Content type: text/plain
Description: Configuration file for the script which includes the database connection and other settings for the script
Class: Short Code CRUD
Perform CRUD operations on MySQL table records
Author: By
Last change: This is the configuration file for the script. This file includes the Database Connectivity and Other settings for the script.
Date: 8 years ago
Size: 840 bytes
 

Contents

Class file image Download
<?php
@session_start();

//DATABASE DETAILS
//SET HOSTNAME
$hostname = "localhost";

//MYSQL USERNAME
$username ="root";

//MYSQL PASSWORD
$password="";

//MYSQL DATABASE NAME
$database="bharatcode";

//DATABASE CONNECTION

mysql_connect($hostname,$username,$password) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());

unset(
$hostname);
unset(
$username);
unset(
$password);
unset(
$database);

//DATABASE CONNECTION CODE END


/*SET THE DEFAULT PAGE PER RECORD LIMIT*/
if(!isset($_SESSION['pagerecords_limit']))
{
   
$_SESSION['pagerecords_limit']=20;
}

// TABLE PREFIX
define("TABLE_PREFIX","bh_"); //DATABASE TABLE PREFIX IF YOU HAVE SET LIKE : bh_user_master. => "bh_" otherwise leave it blank.

/* php.ini DEFAULT SETTINGS OVER-RIDE*/
ini_set("error_reporting", "1");

?>