in reply to How to validate the form in CGI

You may be interested in my tutorial: Validating Forms on the Web.