My cgi
works fine in printing the comment after successfully determining
                                                                 that
all of the required fields were filled out but doesn't print the error
                                                                 message
when I leave a required field empty.  All I get is a server eroor
                                                                 - not
the error I specified in the code.  Can someone see what I might
                                                                 be
doing wrong?

                                                                 # The
next if-else loop figures out if everything was filled in properly
                                                                 if
($type && $size && $toppings && $name && $address && $city &&
                                                                 $state
&& $zip) {

                                                                        
# Here's where it opens formdata.html for appending and adds
                                                                
$complete_order to it
                                                                        
open(FORMDATA, ">>../pizza/formdata.html");
                                                                        
print FORMDATA "$complete_order\n";
                                                                        
close(FORMDATA);

                                                                        
# Then it prints a message to say that everything worked
                                                                        
print "<div align\=\"center\">Congrats\, you\'ve ordered a
                                                                
pizza<\/div><br>\n";

                                                                 } else
{

                                                                        
# Error messages
                                                                        
print "You dope, you forgot to fill in the following\:\n";
                                                                        
print "<ul>\n";
                                                                        
unless ($type)          { print "<li>type of order\n"   }
                                                                        
unless ($size)          { print "<li>pizza size\n"      }
                                                                        
unless ($toppings)      { print "<li>toppings\n"        }
                                                                        
unless ($name)          { print "<li>name\n"            }
                                                                        
unless ($address)       { print "<li>address\n"         }
                                                                        
unless ($city)          { print "<li>city\n"            }
                                                                        
unless ($state)         { print "<li>state\n"           }
                                                                        
unless ($zip)           { print "<li>zip\n"             }
                                                                        
print "<\/ul>\n";

                                                                 }
                                                                 print
"\n";
                                                                 print
end_html();

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to