Putting together the simplest of web forms with a select drop down, yet for some reason, this one relentlessly seems to select the ELSE each time the $teamtypeid is equal to 1. I am using a print to ensure $teamtypeid does actually equal 1 and it displays it correctly in that print statement on the live site, yet the select shows option 2 still shows as selected in the drop down each time.
I feel like this must be something incredibly obvious that I am missing, but can't spot it!
<label for="select01">Team: <?= print $teamtypeid ?></label>
<select class="form-control" id="select01" name="teamtype">
<?php
if($teamtypeid == 1)
{
echo"
<option value=1 SELECTED>First Team 1</option>
<option value=2>Reserves/Youth</option>
";
}
else
{
echo"
<option value=1>First Team</option>
<option value=2 SELECTED>Reserves/Youth</option>
";
}
?>
</select>