I'm currently using a free MySQL/PHP host, as I learn this language, and was wonderng if there was anyway to let the user know if the MySQL server is down.<br> I don't want all those errors to display n the page, so is there someway to know that the server is down, and redirect them to another page?<br> -Manuel
Hi,
Maybe use something like this...
<? // Try and connect $success = mysql_connect("host","user","pass");
if (!$success) // If connection failed { header("Location: errorpage.php"); EXIT; // Exit script }
<rest of your code> ?>