prepare('SELECT username FROM users WHERE username = ?'); $op->execute($usernameArray); $data = $op->fetch(); if (isset($data['username'])) $dbUsername = $data['username']; else $dbUsername = NULL; if (isset($dbUsername)) { return true; } else { return false; } }