Yeah, I usually assign variables to everything so I don't have to concatenate. Try this or some variation of, or assign another variable to the username too like $u_name = SESSION['username'], then use $u_name to compare against the $filename in the if()
PHP Code:if(is_dir($filename) && $filename == . SESSSION['username'] . ) {
