membuat checkbox php

http://stackoverflow.com/questions/4997252/get-post-from-multiple-checkboxes
http://www.formget.com/php-checkbox/
http://www.html-form-guide.com/php-form/php-form-checkbox.html
http://blog.rosihanari.net/memproses-input-komponen-check-box-di-php/




<form action="test.php" method="post">
<input type="checkbox" name="check_list[]" value="value 1">
<input type="checkbox" name="check_list[]" value="value 2">
<input type="checkbox" name="check_list[]" value="value 3">
<input type="checkbox" name="check_list[]" value="value 4">
<input type="checkbox" name="check_list[]" value="value 5">
<input type="submit" />
</form>
<?php
if(!empty($_POST['check_list'])) {
    foreach($_POST['check_list'] as $check) {
            echo $check; //echoes the value set in the HTML form for each checked checkbox.
                         //so, if I were to check 1, 3, and 5 it would echo value 1, value 3, value 5.
                         //in your case, it would echo whatever $row['Report ID'] is equivalent to.
    }
}

Subscribe to receive free email updates:

0 Response to "membuat checkbox php"

Post a Comment