jennypretty
12-15-2010, 02:49 PM
Hello,
I have been having problems with my host about too many connections so I want to create a page that redirects to a new page when it happens, so it looks more professional, instead of error page.
Here is my code:
<? php
if mysql_connect() == FALSE
header("Location: www.mysite.com/redirect.php");
{
//connection made}
else { //
header("Location: www.mysite.com");
}
?>
I like to ask one question:
Is this a correct code? and Where should I place this code?
thanks.
I have been having problems with my host about too many connections so I want to create a page that redirects to a new page when it happens, so it looks more professional, instead of error page.
Here is my code:
<? php
if mysql_connect() == FALSE
header("Location: www.mysite.com/redirect.php");
{
//connection made}
else { //
header("Location: www.mysite.com");
}
?>
I like to ask one question:
Is this a correct code? and Where should I place this code?
thanks.