0

I have a mysql table with several values that I output to a web page. How can I add an option to delete the value from the webpage? Like, have a button that deletes its respective value?

0

2 Answers 2

1

Add a button that posts back some row identifier, and have the code at the back-end delete the corresponding row.

If you want to be smarter, use AJAX to post the deletion request, while deleting the row in the UI with JavaScript.

If you want to be even smarter, use Comet to deliver table updates, and have the back-end that deletes the row broadcast the deletion event to all connected browsers, so that everyone viewing the row, including the user who requested the deletion, can see the change.

Sign up to request clarification or add additional context in comments.

Comments

0

Execute a mysql delete statement.

1 Comment

How exactly would I do that? I know the command to delete a value, but how would I make it select its respective value and how would I trigger the delete on the click.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.