Usa questo codice
Codice PHP:
<?php
$db_host='localhost';
$db_db='xxxxxxx';
$db_user='xxxxx';
$db_pw='xxxxxxx';
$db_C = mysq_connect($db_host,$db_user,$db_pw);
$db_slc= mysql_select_db($db_db);
if (!$db_C) {
die('Db non presente : ' . mysql_error());
}
if(!$db_slc) {
die ("nn funzica proprio") . mysql_error($db_slc);
}
?>