Ok we just had one of those MySQL errors. The image thing worked (the error.gif) was displayed, but it slowed down the website a bit.
Here is the code used:
PHP Code:
mysql_connect($hostname,$username,$password);
if(mysql_error() == "")
{
// Display the right image
}
elseif (mysql_error() != "")
{
header("Location: " . "http://franklin.f2o.org/topsite/error.gif" . "");
}
It seems to be taking alot of time trying to connect... is there a faster way to try connect, and VERY fast say if there is a error or not?
hmmm how about
:
PHP Code:
$link = @mysql_connect($hostname,$username,$password);
if (!$link)
{
header("Location: " . "http://franklin.f2o.org/topsite/error.gif" . "");
}
Would that speed it up, as far as testing goes?