Codeigniter php check/uncheck all checkboxes without using jquery or javascript -


is possible check/uncheck checkboxes @ once without using jquery or javascript (only php , codeigniter)?

can try $_get?

<?php  $all_checked = false;  if (!empty($_get['all_checked']))     $all_checked = true;  ($i = 0; $i < 10; $i++)     if ($all_checked)         echo '<input type="checkbox" checked="checked">';     else         echo '<input type="checkbox">'; ?> <a href="?all_checked=1">check all</a> <a href="?all_checked=0">uncheck all</a> 

now when click on link, either checks or unchecks all.

preview (press f9 or run)


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -