Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php for ($i=1; $i < 10; $i++) { ?>
- <form method="POST">
- <table>
- <tr>
- <td>
- <input type="text" name="kalori[<?php echo $i; ?>]" value="<?php echo 'kalori-'.$i; ?>">
- </td>
- <td>
- <input type="checkbox" name="tm[]" value="<?php echo $i?>"> <?php echo $i; ?>
- <td>
- </tr>
- <?php } ?>
- <tr>
- <td colspan=5><input type='submit' class="btn btn-success" name='submit' value='Proses'></td>
- </tr>
- </table>
- </form>
- <?php
- if(isset($_POST['tm'])){
- foreach($_POST['tm'] as $chk)
- {
- $rowid=$chk;
- $tgl=trim($_POST["kalori"][$chk]);
- echo "cbx ".$rowid."==".$tgl."<br>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement