title: PHP/HTML Radio Button Checked on Default issue
body: <p>Creating a radio button set based off of PHP/MySQL</p>
  
  <p>Having an issue with a button being checked on default:
  What it looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/eilX2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eilX2.png" alt=""></a>
  </p>
  
  <p>The code:</p>
  
  <pre><code>$first = TRUE;
  if (mysql_num_rows($result))
  {
     for ($j = 0; $j &lt; mysql_num_rows($result); $j++)
     {
       $currentCat = mysql_result($result, $j, 'category');
       if ($first == TRUE)
       {
         $first = FALSE;
         echo "&lt;input type='radio' name='createCat' value='$currentCat' checked='checked' /&gt;$currentCat checked";
       }
       else
       {
         echo "&lt;input type='radio' name='createCat' value='$currentCat' /&gt;$currentCat ";
         echo "non";
       }
     }
     echo &lt;&lt;&lt;_END
     &lt;br /&gt;&lt;input type='submit' value='Create' /&gt; $error
     &lt;/form&gt;
  _END;
  }
  </code></pre>
  
  <p>Notice how the first box isnt checked
  The output in HTML:</p>
  
  <pre><code>&lt;input type='radio' name='createCat' value='opt1' checked='checked' /&gt;opt1  checked&lt;input type='radio' name='createCat' value='opt2' /&gt;opt2 non&lt;input type='radio' name='createCat' value='Accounts' /&gt;Accounts non             &lt;br /&gt;&lt;input type='submit' value='Create' /&gt; 
  </code></pre>