php - Validating looped checkboxes using -


how validate checkboxes. 1 or more of them must checked before user can proceed next page using javascript , form this?

        echo "<form method="post" action="confirm.php">";           $query = mysqli_query($conn, "select data                                                 details;"); if(mysqli_num_rows($query)){                  while($row = mysqli_fetch_assoc($query)){             echo "<h5><input type='checkbox' name='data[]' value='".$row['data']."'>apple";         }      } echo "</form>"; 

validate them what? like:

$("form").on("click", "input[type=submit]", function (e) {     e.preventdefault();     // check inputs here .. if whatever } 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -