As this post may be viewed by developers new to programming, I want to note that you will most certainly want to sanitize any data coming in, as it is being used directly. It’s probably best to use prepared statements. This will prevent someone from possibly deleting all rows in your table, or even worse. For those who want more info, check out http://us.php.net/mysqli, and then look at the prepared queries section.
Otherwise, a great post! Thanks Jeff!