hi,
if my website on server1 and DB on server2 how can i test the availbility of server2 when i try to connect o my DB from server1. so that i can echo appropriate message, thanks
Would it be possible to attempt to connect to the database? Then if it fails, it would also be apparent that the database is unavailable.
can i do something like?
$myconn = mysql_connect("localhost", $username, $password); if (!$myconn) { header("location:db_busy.html"); } else { mysql_select_db($db_myconn, $myconn); }
well, I suppose you could do that.