Ver originalif (!mysql_select_db('nombre_bbdd') && mysql_errno() == 1049) { header('Location: noexiste.html'); die();}