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
Post a Comment