Share it

Bookmark and Share

Translate

Thursday, June 7, 2012

0 Method to choose database configuration in online and offine



<?php
 /*************************************
 *                               config.php


 *************************************/
session_start();
$online=2;//1=online,2=offline
if($online==1)
{
$dbhost = 'localhost';
$dbname = ' db_name ';
$dbuser = 'root';
$dbpasswd = 'pass';


}
else if($online==2)
{
$dbhost = 'localhost';
$dbname = 'db_name';
$dbuser = 'root';
$dbpasswd = '';
}
?>

0 comments:

Post a Comment

Thanks for your valuable Comment

 

TechnoTipworld- Tips,Tricks,Technology Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates