Search Tutorials
The Script We’re going to edit the sub return_html part of the script first.
sub return_html {
# Local variables used in this subroutine initialized. #
#local($key,$sort_order,$sorted_field);
# If redirect option is used, print the redirectional location header. #
#if ($Config{'redirect'})
#{
# print "Location: $Config{'redirect'}\n\n";
#}
# Otherwise, begin printing the response page. #
#else
#{
# Print HTTP header and opening HTML tags. #
print "Content-type: text/html\n\n";
# print "$#60;html$#62;\n $#60;head$#62;\n";
# Print out title of page #
# if ($Config{'title'}) { print " $#60;title$#62;$Config{'title'}$#60;/title$#62;\n" }
# else { print " $#60;title$#62;Thank You$#60;/title$#62;\n" }
# print " $#60;/head$#62;\n $#60;body";
# Get Body Tag Attributes #
# &body_attributes;
# Close Body Tag #
# print "$#62;\n $#60;center$#62;\n";
# Print custom or generic title. #
# if ($Config{'title'}) { print " $#60;h1$#62;$Config{'title'}$#60;/h1$#62;\n" }
# else { print " $#60;h1$#62;Thank You For Filling Out This Form$#60;/h1$#62;\n" }
# print "$#60;/center$#62;\n";
print "response=Below is what you submitted to $Config{'recipient'} on ";
print "$date";
# Sort alphabetically if specified: #
# if ($Config{'sort'} eq 'alphabetic') {
# foreach $field (sort keys %Form) {
# If the field has a value or the print blank fields option #
# is turned on, print out the form field and value. #
# if ($Config{'print_blank_fields'} || $Form{$field}) {
# print "$field: $Form{$field}\n";
# }
# }
# }
# If a sort order is specified, sort the form fields based on that. #
# elsif ($Config{'sort'} =~ /^order:.*,.*/) {
# Set the temporary $sort_order variable to the sorting order, #
# remove extraneous line breaks and spaces, remove the order: #
# directive and split the sort fields into an array. #
# $sort_order = $Config{'sort'};
# $sort_order =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
# $sort_order =~ s/(\s+)?\n+(\s+)?//g;
# $sort_order =~ s/order://;
# @sorted_fields = split(/,/, $sort_order);
# For each sorted field, if it has a value or the print blank #
# fields option is turned on print the form field and value. #
# foreach $sorted_field (@sorted_fields) {
# if ($Config{'print_blank_fields'} || $Form{$sorted_field}) {
# print "$sorted_field: $Form{$sorted_field}\n";
# }
# }
# }
# Otherwise, default to the order in which the fields were sent. #
# else {
# For each form field, if it has a value or the print blank #
# fields option is turned on print the form field and value. #
# foreach $field (@Field_Order) {
# if ($Config{'print_blank_fields'} || $Form{$field}) {
# print "$field: $Form{$field}\n";
# }
# }
# }
# print "$#60;p$#62;$#60;hr size=1 width=75%$#62;$#60;p$#62;\n";
# Check for a Return Link and print one if found. #
# if ($Config{'return_link_url'} && $Config{'return_link_title'}) {
# print "$#60;ul$#62;\n";
# print "$#60;li$#62;$#60;a #href=\"$Config{'return_link_url'}\"$#62;$Config{'return_link_title'}$#60;/a$#62;\n";
# print "$#60;/ul$#62;\n";}
# Print the page footer. #
# print $#60;$#60;"(END HTML FOOTER)";
# $#60;hr size=1 width=75%$#62;$#60;p$#62;
# $#60;center$#62;$#60;font size=-1$#62;$#60;a #href="http://www.worldwidemart.com/scripts/formmail.shtml"$#62;FormMail$#60;/a$#62; V1.6 © #1995 -1997 Matt Wright$#60;br$#62;
# A Free Product of $#60;a href="http://www.worldwidemart.com/scripts/"$#62;Matt's Script #Archive, Inc.$#60;/a$#62;$#60;/font$#62;$#60;/center$#62;
# $#60;/body$#62;
# $#60;/html$#62;
# (END HTML FOOTER)
#}
}
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|