title: How to use Check box to change MySql query in real time?
body: <p>On my website get articles with PHP query, something like</p>
  
  <pre><code>$sql - ("SELECT * FROM articles WHERE showing=0");
  </code></pre>
  
  <p>most important thing here is <strong>showing=0</strong> I'll explain why latter on.</p>
  
  <p>I was thinking of adding a <strong>check box</strong> that will do the following:
  If user checks the check box it will change <strong>showing=1</strong> and if it is unchecked <strong>showing=0</strong>.</p>
  
  <p>How would I make it so <strong>1)</strong> it remembers if user has or hasn't clicked a check box. So every time user visits the website the check box is on or off depending on what user did before.
  <strong>2)</strong> refresh page to show new results if for example <strong>showing=0</strong> changed to <strong>showing=1</strong> ?</p>