Database Connection Using Php
$connection = mysql_connect(“hostname”,”username”,”password”);
$db = mysql_select_db(“database name”,$connection);
Where $connection is the link identifier .
For example if you are running the program on your local machine then hostname =”localhost’ ,username =”root” and password =”” .
If you are running the code on your development/live server then you can get the hostname from phpmyadmin and username and password from cpanel mysql database wizard.