codedude
codedude

Reputation: 6509

Delete Mysql Values

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?

Upvotes: 0

Views: 113

Answers (2)

Miguel Silva
Miguel Silva

Reputation: 633

Execute a mysql delete statement.

Upvotes: 0

Marcelo Cantos
Marcelo Cantos

Reputation: 185852

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.

Upvotes: 1

Related Questions