Tag: checkbox

  • how to handle dynamic multiple checkbox in php

    <?php if($_SERVER[‘REQUEST_METHOD’]==’POST’) { $str=””; // if the chkbox selected then selected checkbox values are come otherwise its not come foreach($_POST[‘chkbox’] as  $chkbox) { $str .=$chkbox.”,”; } echo $str; echo substr($str,0,-1);//remove last one char (, comma) from this string } ?> <!– suppose you have dynamic checkbox. Those comes from database  . So, you can use…