Hi,
Opening a connection to MySQL database from PHP is easy. Just use the mysql_connect() function like this
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'password';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'petstore';
mysql_select_db($dbname);
?>
$dbhost is the name of MySQL server. When your webserver is on the same machine with the MySQL server you can use localhost as the value of $dbhost. The $dbuser and $dbpass are valid MySQL user name and password
Thanks,
Gino
Endha Classifieds