How to connect to SQL DB/ Connect failure?

Status
Not open for further replies.

rajjak10968

Member
Messages
33
Reaction score
0
Points
6
Hey there I'm trying to make a news feature for my site but can't connect to the database. I think I am doing something wrong can someone help me?

Code:
mysql_connect("localhost, "legitadm","") or die(mysql_error())
mysql_select_db("legitadm_news") or die (mysql_error));

legitadm is my username, news is my database.

Any help would be greatly appreciated.
 
Status
Not open for further replies.
Top