#!/usr/bin/perl -w

use CGI qw(:standard);

my $favorite = param ("flavor");
print header,
   start_html ("Hello Ice Cream"),
   h1 ("Hello Ice Cream");
if ($favorite) { # już znamy smak lodów
   print p ("Your favorite flavor is $favorite.");
} else { # nie przekazano parametru: pytamy o smak
   print hr, start_form;
   print p ("Please select a flavor: ",
      textfield ("flavor", "mint"));
   print end_form, hr;
}
print end_html;
Last modified: poniedziałek, 10 sierpnia 2015, 10:49