title: How to pass boolean values between PHP, HTML forms, and Javascript
body: <p>I have a PHP program that uses HTML forms and uses JavaScript for validation.  There's a hidden field in the HTML form containing a boolean value that gets set by PHP, validated on submission by JavaScript, and passed to another PHP page.</p>
  
  <p>When I tried to use PHP booleans to set the value of the HTML field, JavaScript evaluated it as blank, so I used ones and zeros and compared them numerically instead, and now it works fine.</p>
  
  <p>My question is: what is best practice in this scenario?  How do I get JavaScript to read a true/false value in my PHP-driven HTML hidden field without using ones and zeros?  Or is that just a bad idea altogether?</p>