Check your Web Host (MySQL Server)

by shatul patil

HTML

Create a new file called testconnection.php and paste the following code in it:

<pre><?php
$link = mysql_connect('localhost', 'root', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?></pre