View Single Post
Old 02-18-2012, 12:50 PM   #2
emerald000
the Mathemagician~
Retired StaffFFR Veteran
 
emerald000's Avatar
 
Join Date: Nov 2005
Location: Quebec City
Age: 33
Posts: 1,320
Send a message via Skype™ to emerald000
Default Re: PHP+MySQL Database Problem

The database shouldn't be chosen in mysql_connect. The correct syntax would be:

Code:
if(!mysql_connect($server, $username, $password))  
{  
    exit('Error: could not establish database connection');  
}

if(!mysql_select_db($database))  
{  
    exit('Error: could not establish database connection');  
}
emerald000 is offline   Reply With Quote