title: Inserting value of checkbox into MySQL column with same name as checkbox name
body: <p>Thank you for your responses!  I see where you're coming from.  I didn't word my question as I should have but what I'm really trying to figure out is what is the best way to insert values into the database.</p>
  
  <p>here is an example of the form</p>
  
  <pre><code>&lt;form name="election" action="post.php" method="POST"&gt;
  &lt;b&gt;Sally&lt;/b&gt;&lt;br&gt;&lt;input type="checkbox" name="FR01" value="ON"&gt;
  &lt;b&gt;Suzy&lt;/b&gt;&lt;br&gt;&lt;input type="checkbox" name="FR02" value="ON"&gt;
  &lt;b&gt;Jeremy&lt;/b&gt;&lt;br&gt;&lt;input type="checkbox" name="FR03" value="ON"&gt;
  &lt;b&gt;William&lt;/b&gt;&lt;br&gt;&lt;input type="checkbox" name="FR04" value="ON"&gt;
  &lt;div id="search" align=center&gt;&lt;input type="submit" id="search" value="Cast Vote"&gt;&lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have a database with election results that has an auto increment ID and then I would like to place "On" into columns that are named after the checkbox, so if checkbox FR01 is checked, insert "On" in that column and they can select up to three candidates.  My confusion is that all the tutorials and examples I look up, no one has a similar situation as I find myself in and therefor I have not found any examples because every example I find, people use the same name and different values.  I want to simply insert on into a column in a table that the same as the checkbox name.</p>
  
  <p>Sorry for the confusion. I am a novice and this is my first time using this website.
  Thanks</p>