hi guys
i have one error in php that coneect to the mysql database
the conecction is ok
but the selected the database is not work
the erorr is( Access denied for user ''@'localhost' to database )
so plz anyone help me
i have one error in php that coneect to the mysql database
the conecction is ok
but the selected the database is not work
the erorr is( Access denied for user ''@'localhost' to database )
Code:
<?php
$link = mysql_connect('localhost', '', '');
if (!$link) {
die('Not connected : ' . mysql_error());
}
// make aaa the current db
$db_selected = mysql_select_db('amal', $link);
if (!$db_selected) {
die ('Can\'t use amal : ' . mysql_error());
}
?>
Comment