$hostname="SERVER NAME";
$username="root";
$passwd="ROOT";
$db="DATABASE NAME";
if(mysql_connect($hostname,$username,$passwd))
{
$link = mysql_select_db($db) or die("cannot be connected to database.........");
}
else
{
header("location:Error1.php");
}
?>
Just from this code connect database with application and from its objects you can access databse in whole project any where.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment