Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form id="myForm">
- <?php
- // fetch the results
- echo '<table>';
- echo '<tr id="header"><td>Delete</td><td>id</td><td>tooltip</td></tr>';
- while ($result = $query->fetch_object()) {
- // Display the results in a table
- echo '<tr>';
- echo '<td><input type="checkbox" name="tooltip_'.$result->id.'" value="'.$result->id.'" /></td>';
- echo '<td>'.$result->id.'</td>';
- echo '<td>'.$result->tooltip.'</td>';
- echo '</tr>';
- }
- echo "</table>";
- ?>
- <input type="submit" value="Go" style='margin:1em;height:2.5em;background:#222;color:#fff'>
- </form>
- <?php
- } else {
- echo 'ERROR: There was a problem with the query.';
- }
- }
- ?>
- <a href="index.php">Part 1 - Login Page</a>
- <script type="text/javascript">
- $(document).ready(function(){
- $('#myForm').submit(function() {
- $.get("managetooltip.php", {action: "delete", k: "7"}, function(data){
- //alert("Data Loaded: " + data);
- });
- return false;
- })
- });
- </script>
Add Comment
Please, Sign In to add comment