Unix database connection string for ipower, ipage, startlogic, bizland, fatcow, Readyhosting, blue host....
< ?php
$username = “your_name”;
$password = “your_password”;
$hostname = “localhost”;
//connection to the database
$dbname = mysql_connect($hostname, $username, $password)
or die(“Unable to connect to MySQL”);
echo “Connected to MySQL
“;
?>
Note: Here if ($hostname, $username, $password) are matched then only it connect to $dbname (Database name). In most of the web page, you can view this code in config.php file.
< ?php
$username = “your_name”;
$password = “your_password”;
$hostname = “localhost”;
//connection to the database
$dbname = mysql_connect($hostname, $username, $password)
or die(“Unable to connect to MySQL”);
echo “Connected to MySQL
“;
?>
Note: Here if ($hostname, $username, $password) are matched then only it connect to $dbname (Database name). In most of the web page, you can view this code in config.php file.
No comments:
Post a Comment