How i would connect .php file with fruit database as i have been intalled XAMPP IN
C:/X DIRECTORY?
C:\x\php>php check.php
I am trying to connect check.php file with mysql fruit database table fruit for this I was writing command in check.php are as below
<?$db=mysql_connect("localhost"); mysql_select_db("fruit",$db); $query="SELECT * FROM fruits";
$result=mysql_query($query); $table=mysql_field_table($result,0); echo $table;?>
Output was
Warning: mysql_connect(): Access denied for user 'ODBC'@'localhost' (us
ing password: NO) in C:\x\php\check.php on line 2
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link
resource in C:\x\php\check.php on line 3
Warning: mysql_query(): Access denied for user 'ODBC'@'localhost' (usin
g password: NO) in C:\x\php\check.php on line 5
Warning: mysql_query(): A link to the server could not be established i
n C:\x\php\check.php on line 5
Would any one tell me what’s going wrong OR HOW I WOULD ABLE TO CONNECT MYSQL WITH PHP IN XAMPP?