#!/usr/bin/perl use strict; use CGI qw(:standard); #notifies that CGI will be implemented. print header, start_html("Form"), #start of HTML. h1("Form"); if (param()) { #variable definitions. my $who = param("firstname"); my $who2 = param("lastname"); my $email = param("email"); my $profession = param("profession"); my $creditcard = param("creditcard"); my $creditcardnumber = param("creditcardnumber"); my $question = param("question"); print p("Thank You. Here is your receipt:"); print p("Name: $who $who2"); print p("E- mail: $email"); print p("Profession: $profession"); print p("Credit Card: $creditcard"); print p("Credit Card Number: $creditcardnumber"); print p("Question: $question"); } else { print hr(), start_form(); print p("What's your first name?", textfield("firstname")); print p("What's your last name?", textfield("lastname")); print p("Enter your e- mail address", textfield("email")); print p("What is your profession?", popup_menu("profession", ['Pimpin', 'Hustlin n Bustlin', 'Crackalakin', 'Playa', 'Thuggin n Buggin'])); print p("What type of credit card will you be using?", radio_group("creditcard", ['Asiv', 'Retsam Card', 'Gotham Express'])); print p("Please enter your credit card number:", textfield("creditcardnumber")); print p("Choose a question:", checkbox_group("question", ['Do you understand the words coming out of my mouth?', 'Go ahead, want to make my day, punk?', 'Are you ready to get funkafied?'])); print p(submit("Submit"), reset("Reset")); print end_form(), hr(); } print end_html