<?php define("DB_HOST","localhost:81"); define("DB_USER","root"); define("DB_PASSWORD,"sandeep"); define("DB_DATABASE","android_api"); ?>
<?php class DB_Connect { // constructor function __construct() { } // destructor function __destruct() { // $this->close(); } // Connecting to database public function connect() { require_once 'config.php'; // connecting to mysql $con = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); // selecting database mysql_select_db(DB_DATABASE); // return database handler return $con; } // Closing database connection public function close() { mysql_close(); } } ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)