Hi guys, I’ve been playing with my php scripts for some time now, I just need a little help on how to redirect my visitors to another page that says a much clear message that the current website has encountered some **database connection error** or is under construction maybe. I have disabled error reporting which is – error_reporting(0);
A really simple markup will be much appreciated. Thank you.
error_reporting(0);
$myconnection = mysql_connect(“localhost”,”root”,””) or die($myconnection);
$dbconnection = mysql_select_db(“db”) or die($dbconnection);
if (die($myconnection) === true){
header(“Location: redirect.html”);
}