$offset = (isset($_POST['dbnum']) && preg_match("#^[0-9]+$#", $_POST['dbnum']) ? $_POST['dbnum'] : 0);