We cannot see how you did the connect (where is the code?). Usually you execute commands like
Code:
// connect to the MYSql server
$db=mysql_connect("servername", "username", "password")
or die(mysql_error());
// Connect to your data base
mysql_select_db("dbname")
or die(mysql_error());
Comment