First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Eng Wei Chua | Website: http://www.thevisionstudios.com

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)
	#}
}
» Level Advanced

Added: 2000-05-02
Rating: 7 Votes: 161
(10 being the highest)
» Author
Eng Wei Chua
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.