title: print value of checked checkbox
body: <pre><code>if (isset($_POST['approve']))
  {
      $con=mysql_connect("localhost","root","");
      mysql_select_db("shoolin",$con);
      $arr=$_POST['check'];
      foreach($arr as $selected)
      {
      echo $selected."&lt;/br&gt;";
      }
  }
  </code></pre>
  
  <p>i need to print the value of checkbox which is checked,so please suggest some solution to solve this problem of printing value of checkbox</p>
  
  <p>This code shows an error in the foreach loop</p>
  
  <pre><code>Invalid argument supplied for foreach() in C:\xampp\htdocs\xampp\user.php on line 8
  </code></pre>