Insert then delete Data

i have a form that inserts the form data into a table (pending_tbl) and all pending are outputted in a list with accept button, when you click the accept button it populates a form with the details for viewing, if all is ok you click submit and it inserts this into another table (members_tbl) this works but what i need it to do is once it inserts the data into members_tbl it deletes it from pending_tbl.

Who is this done?