<?php
// define vars
$sqlhost = "localhost";
$db_user = "sql_user_name";
$db_password = "sql_user_name_password";
<font color=green>
// now make the connection.
// note: $dbh is the database handle, you can make
// multiple connections if you want or give it
// a differenet name.[/tt]
$dbh = mysql_connect($sqlhost,$db_user,$db_password);
mysql_select_db($database_name,$dbh);
$err = mysql_error();
if ($err){
echo "Error in database : $err";
exit;
};
?>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.