Changeset 15


Ignore:
Timestamp:
Oct 11, 2006, 8:11:28 AM (13 years ago)
Author:
Dominic Hargreaves
Message:

Simplify error function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/cgi/submit.cgi

    r13 r15  
    8484    print CGI::escapeHTML($err);
    8585    print "</p><p>Your input was:</p>\n<ul>";
    86     my %params;
    8786    foreach my $field (@fields) {
    88         if (defined $cgi->param($field)) {
    89             $params{$field} = $cgi->param($field);
    90         } else {
    91             $params{$field} = '';
    92         }
    93         print "<li>$field: " . $params{$field} . "</li>\n";
     87        my $param = $cgi->param($field) || '';
     88        print "<li>$field: " . $param . "</li>\n";
    9489    }
    9590    print "</ul></body></html>\n";
Note: See TracChangeset for help on using the changeset viewer.