Here is a Php Db Connection Script
<?php
$dbhost = "localhost";
$dbuser = "DBUSERNAME";
$dbpass = "DBPASSWORD";
$dbdata = "THEDATABASENAME";
if (!@mysql_connect($dbhost, $dbuser, $dbpass)) {
die("ERROR NOT CONNECTED......<br>ERROR: ".mysql_error());
}
if (!@mysql_select_db($dbdata)) {
die("ERROR NO DATABASE SELECTED<br>ERROR: ".mysql_error());
}
mysql_query("SET NAMES 'utf8'");
?>
Bookmarks