<? php
mysql_connect ("localhost", "root", "password");
mysql_select_db ("MyDatabase");
?>
script above for a password can be changed according to the password for your database. and "MyDatabase" above is the name of the database that you created with MySQL or phpMyAdmin. To try the script above we can write like this.
<? php
$query = mysql_connect ("localhost", "root", "password"); mysql_select_db ("MyDatabase");
if ($ query)
{
echo "successfully connect to database ";
}
else
{
echo "can not successfully connect to the database ";
}
?>
then save this file with a name like" connect.php ". ooo you can write this in notepad, edit + +, or Dreamweaver. Good luck. By Ardian