Hey,
I have a problem with making a connection to a database.
This is the code:
<?php
$host='localhost';
$user='xxxxxx';
$pass='xxxxxx';
$conn=mysql_connect($host, $user, $pass);
$selected = mysql_select_db("stinos_hardcorepunk",$conn) or die("Could not select first_test");
$sql = "SELECT * FROM videos ORDER BY id DESC LIMIT 5";
$res = mysql_query($sql) or die (mysql_error());
?>
It gives me the error:
Warning: mysql_connect(): Access denied for user: 'stinos_stinos@localhost' (Using password: YES) in /home/hardcore/public_html/index.php on line 49
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/hardcore/public_html/index.php on line 50
Could not select first_test
The database exists and it is the correct name :queasy:
Please help me, thanks.