Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use CGI qw(:standard); #n +otifies 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", ['Pim +pin', '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("credit +cardnumber")); print p("Choose a question:", checkbox_group("question", ['Do you +understand the words coming out of my mouth?', 'Go ahead, want to mak +e my day, punk?', 'Are you ready to get funkafied?'])); print p(submit("Submit"), reset("Reset")); print end_form(), hr(); } print end_html
Love always,
Audrey
Edit by tye, title, preserve formatting, etc.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Audrey Fong
by ehdonhon (Curate) on Nov 11, 2003 at 04:43 UTC | |
Re: Audrey Fong
by ysth (Canon) on Nov 11, 2003 at 04:45 UTC | |
Re: Audrey Fong
by Roger (Parson) on Nov 11, 2003 at 04:42 UTC | |
by hardburn (Abbot) on Nov 11, 2003 at 15:02 UTC | |
by eric256 (Parson) on Nov 11, 2003 at 17:45 UTC | |
Re: Need help with regexes to validate user input
by Anonymous Monk on Nov 11, 2003 at 07:33 UTC | |
by ysth (Canon) on Nov 11, 2003 at 08:09 UTC | |
Re: Need help with regexes to validate user input
by Anonymous Monk on Nov 11, 2003 at 07:13 UTC | |
by ysth (Canon) on Nov 11, 2003 at 07:25 UTC | |
Re: Audrey Fong
by Anonymous Monk on Nov 11, 2003 at 04:46 UTC | |
by ysth (Canon) on Nov 11, 2003 at 05:51 UTC |