Guest User

Untitled

a guest
Jul 14th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. <form id="myForm">
  2.  
  3. <?php
  4. // fetch the results
  5. echo '<table>';
  6. echo '<tr id="header"><td>Delete</td><td>id</td><td>tooltip</td></tr>';
  7. while ($result = $query->fetch_object()) {
  8. // Display the results in a table
  9. echo '<tr>';
  10. echo '<td><input type="checkbox" name="tooltip_'.$result->id.'" value="'.$result->id.'" /></td>';
  11. echo '<td>'.$result->id.'</td>';
  12. echo '<td>'.$result->tooltip.'</td>';
  13. echo '</tr>';
  14. }
  15. echo "</table>";
  16. ?>
  17. <input type="submit" value="Go" style='margin:1em;height:2.5em;background:#222;color:#fff'>
  18. </form>
  19. <?php
  20. } else {
  21. echo 'ERROR: There was a problem with the query.';
  22. }
  23. }
  24. ?>
  25.  
  26. <a href="index.php">Part 1 - Login Page</a>
  27.  
  28. <script type="text/javascript">
  29.  
  30. $(document).ready(function(){
  31. $('#myForm').submit(function() {
  32. $.get("managetooltip.php", {action: "delete", k: "7"}, function(data){
  33. //alert("Data Loaded: " + data);
  34. });
  35. return false;
  36. })
  37. });
  38. </script>
Add Comment
Please, Sign In to add comment