Just for anyone else's reference, I've written a script that checks whether the conn.php file is being referenced via a local OR an online server, and to avoid local errors only checks whether the link has been successfully established if the page is being viewed via the Live server.
Also allows you to use different SQL auth depending on whether you're connecting to your local or remote server. Its not lightening science to anyone, but may be useful to any newbies like me browsing for a solution.
Thanks to those above for their help in building this.
<?PHP // ASH: Define the database connection string
if ($_SERVER["HTTP_HOST"] == "liveserverURLhere.com") {
if(!$conn = mysql_connect("DBHOST", "USERNAME", "PASSWORD")){
header("Location: offline.php");
}
$db = mysql_select_db('NAMEOFDB',$conn);
} else {
$conn = mysql_connect('localhost','root','password');
$db = mysql_select_db('NAMEOFDB',$conn);
}
?>