title: How to display a php variable in input checkbox
body: <p>I made a small user database with some checkboxes in a html input form.
  In there I have some basic infos about the users like value 1 and 2 (among others) and some checkboxes as well (here you see one). Default is always 0, but when I click the checkbox its changes to 1. </p>
  
  <pre><code>&lt;input type="text" placeholder="Value 1" value="&lt;?php echo set_value('value1'); ?&gt;" name="value1" size="6"/&gt;
  &lt;input type="hidden" value="0" name="spec1"/&gt;&lt;input type="checkbox" value="1" name="spec1"/&gt;
  &lt;input type="text" placeholder="Value 2" value="&lt;?php echo set_value('value2'); ?&gt;" name="value2" size="6"/&gt;
  </code></pre>
  
  <p>Now I  would like to have a form in which I can see all these informations later on and edit it if necessary. But the checkbox I can't display properly. It is always empty. So I had to change it to a textbox. So I can see whether that specific values are 0 or 1.</p>
  
  <pre><code>&lt;input type="text" name="Value 1" value="&lt;?php echo $value1; ?&gt;"&gt;
  &lt;input type="text" name="spec1" value="&lt;?php echo $spec1; ?&gt;"&gt;
  &lt;input type="text" name="Value 2" value="&lt;?php echo $value2; ?&gt;"&gt;
  </code></pre>
  
  <p>Is it possible somehow to show the values in a checkbox again, so I can change the type of the second line to "checkbox" again instead of "text"? Means can I display a value 1 as a checked checkbox and 0 as an empty checkbox?</p>