Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //..FORM INPUTAN
- $sql="SELECT *
- FROM checklist a
- WHERE check_pos LIKE '%Director%'
- AND check_ok<>'Check'";
- $result = mysql_query($sql);
- if(mysql_num_rows($result)>0)
- while($data = mysql_fetch_object($result))
- {
- ?>
- <li>
- <div class="form_grid_12">
- <label class="field_title" id="actual"><?php echo $data->check_pos; ?></label>
- <input type="hidden"
- value="<?php echo $data->check_pos; ?>"
- name="namepos[<?php echo $data->check_id; ?>]" />
- <div class="form_input">
- <input type="hidden" name="id[]" value="<?php echo $data->check_id; ?>" />
- <input class="checkbox"
- type="checkbox"
- value="Check"
- style="opacity: 0;"
- name="position[<?php echo $data->check_id; ?>]" />
- </div>
- </div>
- </li>
- <?php } ?>
- <input type='hidden' name='code' value='<?php echo $data->check_code; ?>' />
- //..FILE PEMROSES INPUTAN
- include 'config.php';
- $code = $_POST['code'];
- $pos = $_POST['position'];
- $name = $_POST['namepos'];
- foreach($name as $index => $names)
- {
- $insert = mysql_query("INSERT INTO checklist (check_pos,check_code,check_ok)
- VALUES ('$name[$index]','$code','$pos[$index]')")
- or die (mysql_error());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement