View Single Post
  #1 (permalink)  
Old March 22nd, 2009, 08:38 PM
PHP65 PHP65 is offline
Registered User
 
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Need Help for mysql connection

Code:
$conn = mysql_connect(SQL_HOST,SQL_USER,SQL_PASS)
or die('Could not connect to the database; ' . mysql_error());
mysql_select_db('posts', $conn)
  or die('Could not select the database; ' . mysql_error());
when I run this code I get:

Code:
Could not select the database; Access denied for user ''@'localhost' to database 'posts'
No matter what the constants' values are.
Reply With Quote