Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo "<form id='assign' method ='post' action='../../assign_engineer_post_code.php'>";
- echo "<input type='checkbox' checked name='select-all' id='select_all' />Select All<br/><br/>";
- echo "<p style='font-size: 10px; '>";
- while($row = mysqli_fetch_assoc($res)){
- echo "<input type='checkbox' class='checkbox' name='engineers[]' value='".$row['Engineer_id']."' checked><label for='" .$row['Engineer'] ."'>" .$row['Engineer'] ."</label>";
- echo " ";
- $counter++;
- if ($counter == 8){
- //echo "<br/>";
- }
- }
- echo "</p>";
- ?>
- <table><tr>
- <td>
- <button type="button" onclick="clear_sap_data()">Clear Data</button>
- </td>
- <td>
- <button type="button" onclick="import_sap_data()">Import SAP Data</button>
- </td>
- <td>
- <!-- <input name="confirm" type="button" value="Assign Engineers" onclick="doit();" />
- <input id="submit" type="submit" name="submit" value="Submit" onclick="submitForm()" /> -->
- <input id="submit" type="submit" name="submit" value="Submit" onclick="submitForm()" />
- </td>
- </tr>
- </table>
- </form>
- <script>
- function submitForm() {
- var form = document.assign;
- var dataString = $(form).serialize();
- $.ajax({
- contentType: false,
- processData: false
- type:'POST',
- url:'../../assign_engineer_post_code.php',
- data: dataString,
- success: function(data){
- window.location.reload(); // This is not jQuery but simple plain ol' JS
- }
- });
- return false;
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement