Well, I'd probably pass around an unique ID as the identifier for which row I wanted to delete, but this only applies if you only have unique rows in your table, of course.
The basics of it I would do the same, except I would extend it to be more safe. The $_GET variable would be SQL "safed" of course, to make sure it's a value that we expect. I would also only allow this operation to be carried out by someone with higher authorization in the system (assuming some sort of user management system is in place), since once DELETE'd the data is gone.
It doesn't matter if you use POST or GET, once you extract the value of the variable it's all the same to the rest of the script.




Reply With Quote