I am getting an error when I run a CGI script. I ran a very similar script before and had no problems. The script calls for the client to enter name and e-mail address. I have 3 subroutines to handle errors. The first one is generated when no name is entered. The page is returned and the client is requested to enter name and submit. The second checks the e-mail format and if incorrect sends the page back for correction. The third page is returned if the e-mail address is blank. This is the one that is erroring. When I leave the e-mail blank and submit I get a server error. This is the error log.
Thu Sep 21 20:46:46 2006] [error] [client 24.29.59.19] malformed header from script. Bad header=</body></html>: /home/tar3150/public_html/cgi-bin/list.cgi Name "main::hour" used only once: possible typo at list.cgi line 2. Name "main::allow" used only once: possible typo at list.cgi line 27. Name "main::mon" used only once: possible typo at list.cgi line 2. Name "main::thisday" used only once: possible typo at list.cgi line 5. Name "main::wday" used only once: possible typo at list.cgi line 2. Name "main::sec" used only once: possible typo at list.cgi line 2. Name "main::min" used only once: possible typo at list.cgi line 2. Name "main::yday" used only once: possible typo at list.cgi line 2. Name "main::gif4" used only once: possible typo at list.cgi line 19. Name "main::thishour" used only once: possible typo at list.cgi line 3. Name "main::entry" used only once: possible typo at list.cgi line 26.
Since these subroutines are very similar to the ones used before I don't know what is happening. Can anyone help?