02-18-2012, 12:50 PM
|
#2
|
the Mathemagician~
Join Date: Nov 2005
Location: Quebec City
Age: 33
Posts: 1,320
|
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');
}
|
|
|