in reply to HTTP headers and redirection

One of your problems comes from the fact that you're printing the header at the top of your script, before your redirect logic.

#!c:\phpdev\perl\bin\perl.exe print "Content-type: text/html\n\n"; # -----8<-----

The print line in this block interferes with the redirect statements later in the code. Move your print line from this block to your HTML print block, like so:

# -----8<----- else { print "Content-type: text/html\n\n"; # Line moved here. print "<HTML>\n"; print "<HEAD><TITLE>Patton Industries</TITLE><BASEFONT SIZE=5></HEAD>\ +n"; # -----8<-----

In fact, you're printing these headers manually when you should be using CGI.pm. Doing so is simple enough, try this:

my $cgi = new CGI(); # Declare this near the top of the script. print $cgi->header(); # In place of your "Print: content-type..." +statement.

A similar convention exists for your redirect statements. Be sure to review the CGI.pm documentation. It will simplify things for you, even if it looks more complicated now.

A few other suggestions/concerns:

Hope this helps.

/Larry