Forum Moderators: coopster
Can anyone tell me how to do that? What's the function and where should I put the function? Thank you very much.
$dbuser = '';
$dbpass = '';
$dbhost = '';
$dbname = '';$connect = mysql_connect($dbhost,$dbuser,$dbpass);
if (!$connect)
{
header("Location: yourpage.php");
exit;//OR use an include
@include('somepage.php');
exit;
}
else
{
mysql_select_db($dbname, $connect);
}
dc
I used this line and it works:
echo "<meta http-equiv=\"refresh\" content=\"0;URL=temp.php\">";
return;
Is there any disadvantage (for example, search engines don't like it?) to use the meta tag to redirect to another page when the database can't be reached?