'How can I make a button on my html file for my website that removes a row of a table, and a row from a SQL database?

Im trying to make a button that removes a row of a table on my website. The rows contents are determined by a SQL database I made, and so to remove a row of the table I need to remove the data in that row from the database and I'm not sure how. So far i have a button on my html file:

<script>
                function DeleteRowFunction(o) {
                var p=o.parentNode.parentNode;
                    p.parentNode.removeChild(p);
                }
            </script>

I made the button and it removes a row but no SQL data, so the values in the row i want to remove come back when I add a new row.

<td><input type="button" value="Rm" onclick="DeleteRowFunction(this)"></td>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source