title: PHP checkbox validation, if else issue
body: <p>I have a checkbox in my HTML file:</p>
  
  <pre><code>&lt;input type="checkbox" id="kopia" name="kopia" class="form-input" value="0"&gt;
  </code></pre>
  
  <p>I'm trying to pass to the PHP file (via AJAX) a couple of values, one of them is a boolean value created by a checkbox (simplified):</p>
  
  <pre><code>name: "kopia"
  value: document.getElementById("kopia").checked
  </code></pre>
  
  <p>If I check via console, it returns <code>true</code> if checked and <code>false</code> if unchecked.</p>
  
  <pre><code>document.getElementById("kopia").checked
  </code></pre>
  
  <p>If I check via PHP file, it behaves the same:</p>
  
  <pre><code>echo $_POST['kopia']
  </code></pre>
  
  <p>But when I write something like this:</p>
  
  <pre><code>$checkbox = $_POST['kopia'];
  if ($checkbox){
      echo "hey";
  } else {echo "bye";}
  </code></pre>
  
  <p>It always returns "hey", no matter if the checkbox was checked or not. I don't get it. Even if I make something like this:</p>
  
  <pre><code>$checkbox = $_POST['kopia'];
  if ($checkbox){
      echo $checkbox;
  } else {echo "bye";}
  </code></pre>
  
  <p>It never returns "bye", no matter if the box was checked or not, but returns <code>true</code> if checked and <code>false</code> if unchecked. This thing has already stolen a couple of hours and that's a couple of hours too much. Any idea, hint?</p>