in reply to Problem with an update subroutine

Most of your example appears to be copied verbatum from example script from the textbook "MySQL and Perl for the Web" on this page. I think you ought to give credit to the source, and tell us what you modified from the working examples.