I want to create a button that starts off in pending status, and when clicked, changes its status to approved in the database. Afterward, both the color and text of the button should change to indicate success without requiring the page to reload. Once the status changes to either approved or success, the button should become disabled and remain so without toggling back. Thank you in advance...
Here is the button:
<button type="submit" id="approve_button" class="btn btn-danger">Pending
</button>