Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#cancel').click(function(e) {
- e.preventdefault();
- //set value of cancel button to a variable
- var value = $("#cancel").val();
- $.ajax({
- method: "POST",
- url: "updatetable.php",
- data: {cancel: value},
- });
- });
- //updatetable.php
- if($_POST['cancel']) {
- echo $_POST['cancel'];
- }
- <button type='submit' class='btn btn-danger' name = 'cancel' id = 'cancel' value='".$row['order_id']."'>Cancel</button>
- <button type='submit' class='btn btn-success' name = 'received' id= 'received' value='".$row['order_id']."'>Received</button>
Add Comment
Please, Sign In to add comment