Warning: mysql_pconnect() has been disabled for security reasons in /home/banmahat/domains/banmahatoon.com/public_html/lib/conn.php on line 14
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/banmahat/domains/banmahatoon.com/public_html/lib/conn.php on line 21
Can not select the database 'banmahat_db' because:
Code (PHP)
<?php
if (!isset($_COOKIE)) {
session_start();
ob_start();
}
/******************** for local ***********************/
function connect_db() {
$dbhost = 'localhost';
$dbuser = 'banmahat_db';
$dbpass = 'root';
$result = mysql_pconnect($dbhost, $dbuser, $dbpass);
return $result;
}
$dbname = 'banmahat_db';
$Conn = connect_db();
mysql_select_db ($dbname,$Conn) or die ("Can not select the database '$dbname' because: " . mysql_error());
$sql = "SET NAMES 'UTF8'";
$character = mysql_db_query($dbname,$sql);
?>