briintex1
01-15-2004, 07:02 AM
Does anyone see anything that is out of the ordernary with my code, I have made sure that the username and password are 100% correct but I keep getting this one error, and it is something that I am not familar with...I will post it at the end of the code, but this is the code, minus the actual password
<?
$dbh=mysql_connect ("localhost", "stevenbr", "password") or die ('I cannot connect to the database because: ' . mysql_error());
$display = mysql_select_db ("nursing_Nursing");
extract($_GET);
$query = "select * from $display";
if(!isset($display))
{
$display = "nursing";
}
$result = mysql_db_query($dbh, $query) or die ('Sorry we can not use the database: ' . mysql_error());
?>
some html code is here
<?
echo $obj[1];
?>
<?
echo $obj[2];
?>
close of html code
<?
mysql_free_result($result);
mysql_close($db);
?>
the error is
Sorry we can not use the database: Access denied for user: 'nursing_stevenbr@localhost' to database 'Resource id #2'
<?
$dbh=mysql_connect ("localhost", "stevenbr", "password") or die ('I cannot connect to the database because: ' . mysql_error());
$display = mysql_select_db ("nursing_Nursing");
extract($_GET);
$query = "select * from $display";
if(!isset($display))
{
$display = "nursing";
}
$result = mysql_db_query($dbh, $query) or die ('Sorry we can not use the database: ' . mysql_error());
?>
some html code is here
<?
echo $obj[1];
?>
<?
echo $obj[2];
?>
close of html code
<?
mysql_free_result($result);
mysql_close($db);
?>
the error is
Sorry we can not use the database: Access denied for user: 'nursing_stevenbr@localhost' to database 'Resource id #2'