Hi Guys,
I am hoping that someone may be able to help me resolve my issue or at least point me in the right direction. I have already looked at several threads on the topic and google'd it as some of you will recommend but I cannot get it to work for some reason.
I am new to php / mysql therefore please keep that in mind when making suggestions on things to try.
I am using xampp to host a local server. All login settings are still at default.
I am attempting to establish a connection to a database called "listings"
This far my code is as follows:
connection php:
<?php
$bdhost = 'localhost';
$bduser = 'alex';
$dbpass = 'test';
$db = 'listings';
$con = mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($db);
?>
index.php
<?php
include 'includes/connection.php';
$query = "SELECT * FROM listings";
$result = mysql_Query($query);
while($person = mysql_fetch_array($result)){
echo "<h3>" . $person['mls_number'] . "</h3>";
echo "<p>" . $person['address'] . "</p>";
}
?>
The errors I receive are as follows:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: YES) in C:\xampp\htdocs\mls_website\includes\connection.php on line 8
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\mls_website\includes\connection.php on line 9
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\xampp\htdocs\mls_website\includes\connection.php on line 9
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\mls_website\index.php on line 6
Any suggestions are welcomed