try {
$db = new PDO("mysql:host=localhost;dbname=example", "root", "");
} catch ( PDOException $e ){
require_once "error.php";
}
?>