The "file()" function keeps the newlines and/or carriage returns, so you need to use "trim()" on each element. Otherwise the element won't match the name.
foreach ($advisors as $advisor) {
$advisor = trim($advisor);
$form .= '<option value="' . $advisor . '"';
// etc.
Also make sure the upper/lowercases match. Or do:
if (strtolower($advisor) == strtolower($row['advisor'])) {