First thing to do to make it more flexible: learn CSS.
Use [man]isset[/man] to check for the existence of a submitted data. Use [man]intval[/man] to make sure it's an integer.
Why is $cnt (and a longer variable name wouldn't go amiss) supplied once from $_POST and after that from the database?
Speaking of getting $cnt from the database, you're only getting one field from one row, so there's no point using a loop to do it.
Deletions should not be via <a> links. See The Spider of Doom.