I don’t have PHP installed in my local server; it is in the remote server, so, I make my tests transferring the web pages from my disk to the server. When I tried to establish connection with a database there with Mysql_connect, I receive the error msg:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘acaletic_luisi’@‘box243.bluehost.com’ (using password: YES) in /home/acaletic/public_html/lma/test2Jan22.php on line 7
Unable to connect to database
I have tried changing the strings without good results, I can access the database trhu PHPMyadmin. I don’t know if it is a mistake in the strings or of I need to download a driver or what.
Thanks for any help.
This is the code:
<?
$DBhost = "www.acaletics.com";
$DBuser = "acaletic_luisi";
$DBpass = "********";
$DBName = "acaletic_luis";
$table = "Nombres";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");
@mysql_select_db("$DBName") or die("Unable to select database $DBName");
$sqlquery = "INSERT INTO $table VALUES('$id','$name','$telephone','$birthday')";
$results = mysql_query($sqlquery);
mysql_close();
print "<html><body><center>";
print "<p>You have just entered this record<p>";
print "Name : $name<br>";
print "Telephone : $telephone<br>";
print "Birthday :$birthday";
print "</body></html>";
?>