while($row_list=pg_fetch_assoc($list)){
echo '<option' if(isset($_SESSION['hoopSelect'])){ echo 'selected="'$_SESSION['hoopSelect']'"'; } ' value='. $row_list['username'] . '>' . $row_list['username'] . '</option>';}
I want to have my while loop continue working while if $_SESSION['hoopSelect'] is set to 'small' for example, reloading the page it will pre-select the option.
It runs perfectly without if(isset($_SESSION['hoopSelect'])){ echo 'selected="'$_SESSION['hoopSelect']'"'; } '
I get an error page 500 when i add this, i wonder if i am placing it in the wrong location, or if i have strcutured it incorrectly, thanks for any input.