<?php
$db_host = loclhost;
$db_user = ;
$db_pass = ;
$db_database = ;
$link = mysql_connect($db_host,$db_user,$db_pass);
mysql_select_db($db_database,$link);
if(mysqli_connect_errno());
{
echo'номер ошибки:('.mysqli_connect_errno().') '.mysqli_connect_error();
}
?>
<?php
$db_host = "localhost";
$db_user = "root";
$db_pass = "";
$db_database = "test";
$link = mysqli_connect($db_host,$db_user,$db_pass, $db_database );
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
?>