Need Help with Error Checking

I’m not sure if this should go in application design or not so I put it here.

I’m looking for feedback and suggestions on how to handle checking for errors in my functions that depend on a working database connection and that the SQL works. I was thinking about a try catch but if I return input before it catches the exception I would think it would defeat the purpose of the catch. Below is an example code that needs to have error checking added in.

if( empty($_POST['username']) || empty($_POST['password']) ){
    $sError = 'Check that you provided both Username & Password';
}
if( !empty($sError) ){
    displayLogin( $sError, strip_tags($_POST['username']) );
} else {
    $sUsername = filter_var($_POST['username'],FILTER_SANITIZE_STRING);
    $sPassword = md5(PW_SALT.$_POST['password']);
    if( _isValidLogin($sUsername, $sPassword) ){
        if(!_isAccountDisabled($sUsername, $sPassword)){
            createSession($sUsername, $sPassword);
            _redirect('main.php');
        } else {
            displayLogin("Account disabled, please contact support.");
        }
    } else {
        displayLogin("Invalid username and or password.");
    }
}

The above code calls three functions that rely on a database connection being present and the SQL code to work as expected in order for the script to continue. Here are two of the three. One shows some logic of try catch I was thinking about doing but I’m not sure if it would be the best way.

isValidLogin()

function _isValidLogin($sUsername, $sPassword){
	global $oDbConn;
	$rQuery = $oDbConn->prepare("SELECT Id, Username FROM users WHERE Username=? AND Password=? LIMIT 1");
	$rQuery->execute(array($sUsername, $sPassword));
	$aResult = $rQuery->fetch(PDO::FETCH_ASSOC);
	if(!$aResult) {
		return false;
	} else {
		return true;
	}
}

isAccountDisabled()

function _isAccountDisabled($sUsername,$sPassword){
	global $oDbConn;
//	try {
		$rQuery = $oDbConn->prepare("SELECT Id, Active, StoreId from Users WHERE Username=? AND Password=? LIMIT 1");
		$rQuery->execute(array($sUsername, $sPassword));
		$aResult = $rQuery->fetch(PDO::FETCH_ASSOC);
		if(!$aResult) {
			// If it's not found should we return message of not found?
			// Should log database problem...
			// @todo(Throw an exception?)
			return true;
		} else {
			if($aResult['Active'] == true){
				return false;
			} else {
				return true;
			}
		}
//		
//	} catch(PDOException $sError) {
//		// Send error to error handler and return friendly error message.
//	}
}

I’m open to ideas and suggestions. Also let me know if you see any other potential issues.

Off Topic:

Anyone know of any drop in error handler classes so I don’t have to build one from scratch?

Arkh provided a custom error handler recently