Can php website be hosted at different host then phpmyAdmin?

Can I have a default.php file at some hosting place (ftp client)
but database connections refer to phpMyadmin at another location

So default.php is at mywebsite.com but database is located at bluepig.co.uk

I got errors in this code :(

$user_name = "John88";
$password = "blabla";
$database = "members";
$server = "sql13.000webhost.com";
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);

What am I doing wrong?
 
Back
Top