The first step in debugging a CGI script is to run it from the command line. The html that it creates is displayed on the terminal. Try it. I am sure that you will see the problem. Ask again if you need help to fix it. Good Luck, Bill