I have this to connect to mysqli:
$mysqli_c = new mysqli($host, $us, $password, $bd);
if (mysqli_connect_errno()) {
if (mysqli_errno() == 1203) {
header("Location: too_many.php");
exit;
}
}
this gets the "too many connections" error.
what I want is instead of redirect to too_many.php, if error 1203 occur, I want to try again after 10 seconds. This way user can think my website is slow to load, but he will not see the error page.
any ideais how to do this? is it ok?