title: If/else for conditional <select> option
body: <p>I am having troubling getting a simply if/else conditional for options in an html select form. If the value for bid is 'N', then I want one option for the select field to change to "Y" and vice versa. I know my db connection is good and other php works and the form was updating the db fine until I tried to work in the php conditional code within the  so I just need to get the syntax correct. </p>
  
  <pre><code> /* fetch associative array */
   while ($row = mysqli_fetch_assoc($result)){
   ?&gt;
  
   &lt;form method="post" name="update" action="update.php" &gt;
   &lt;select name="bid"&gt;
  
   &lt;option value="&lt;?php echo $row['bid']; ?&gt;" selected="selected"&gt;
   &lt;?php echo $row['bid']; ?&gt;&lt;/option&gt;
  
   &lt;? if ($row['bid'] == 'N') {  
   ?&gt;
  
   &lt;option value="Y"&gt;Y&lt;/option&gt;
  
   &lt;?   } else {
  
   ?&gt;
  
   &lt;option value="N"&gt;N&lt;/option&gt;
  
   &lt;? }
   ?&gt;
  
  &lt;/select&gt;
  &lt;input type="submit" name="Submit" value="update" &gt; 
  &lt;/form&gt;
  
  &lt;?
  }
  </code></pre>