$hostname = "localhost";
//***********************
$dbUser = "root"; //"root";
$dbPass = "1234";//"ced"; //"tct";
//***** OK, you should never use this account. ****
// Create, your own username and password for this database
$dbName = "icit";//test_thai";
//$conn = mysql_connect($hostname, $db_user, $password) or die("Cannot open connection");
//mysql_select_db(“webtech”, $conn ) or die ("Cannot open database");
if (!($link=mysql_connect($hostname, $dbUser, $dbPass))) {
echo "Cannot Open Connection
";
error_log(mysql_error(), 3, “/tmp/phplog.err”);
}
if (!mysql_select_db($dbName, $link)) {
echo "Cannot Open Database $dbName
";
error_log(mysql_error(), 3, “/tmp/phplog.err”);
}
mysql_db_query("test_thai","SET NAMES utf8");
?>