I want to change a cell in mysql table to null through a html/php link. Is there a script that does this in php (not looking to use the post method in a form)?
Some examples: Facebook allows you to delete a wall post with one click. This site allows you to delete stuff with one click (no refresh page). I’m predicting a few answers being jQuery or AJAX. I was hoping to avoid these but if it can’t be helped, ok (because I don’t know them at all).
Just put a query string on the end of the URL and access it via
$_GET.… but don’t. GET requests are defined as being safe. All it takes is something to walk the links (because it knows that it is safe to make GET requests) to ruin your day.
For example: A few years ago, Google brought out some software which would follow links on pages you visited so they would be cached and waiting for you when (if) you eventually clicked on the link. Some people using this software had Admin rights on sites running badly written forum software. The spider went running around with admin rights and deleted every message that the user looked at (because it had a “Delete this post” link instead of a form that used POST).
If you want the deletion to happen without leaving the page, then you could submit the form (because I’ve convinced you to use a form now, right?) to an iframe.