Looking for a simple way to see if PHP is talking to your Database server? Use this! It’s free!
<?php
$server = "127.0.0.1";
$database = "database-name";
$username = "database-username";
$password = "database-password";
$mysqlConnection = mysql_connect($server, $username, $password);
if (!$mysqlConnection)
{
echo mysql_error();
}
else
{
mysql_select_db($database, $mysqlConnection);
}
?>