Лістинг 5.10. lib1.pl
#!/usr/local/bin/perl
#require 'cgi-lib.pl';
use CGI qw/:ReadParse, PrintHeader, HtmlTop, HtmlBot, SplitParam/;
print &PrintHeader;
print &HtmlTop ("CGI Example Using cgi-lib.pl");
print "<BODY BGCOLOR=\ white\ LINK=\ red\><p>
<CENTER><H1>Here is the Survey!</H1></CENTER>
<H2>Please fill out our survey</H2>
Reasons for filling out our survey: <P><UL>
<LI>Fame</LI><LI>Fortune</LI><LI>Fun</LI></UL>
If you would rather not fill out our survey, you might be interested in <A HREF=http://www.cpan.org>CPAN</A>
<HR><FORM METHOD=\"POST\"
ACTION=\"http://inna/scripts/web/l6/lib2.pl\"
ENCTYPE=\"application/x-www-form-urlencoded\">
Please enter your name.
<INPUT TYPE=\"text\" NAME=\"text\" VALUE=\"\"><P>
Please enter your opinion:<P><TEXTAREA NAME=\"textarea\"
ROWS=10 COLS=60>No opinion</TEXTAREA><P>
Please indicate what products you use <P>
<INPUT TYPE=\"checkbox\" NAME=\"checkboxes\"VALUE=\"Shampoo\"> Shampoo
<INPUT TYPE=\"checkbox\" NAME=\"checkboxes\"VALUE=\"Toophpaste\"> Toothpaste
<INPUT TYPE=\"checkbox\" NAME=\"checkboxes\" VALUE=\"Bread\" CHECKED> Bread
<INPUT TYPE=\"checkbox\" NAME=\"checkboxes\" VALUE=\"Cruise missiles\" CHECKED>Cruise missiles </P>
Please indicate your income level:<P><SELECT NAME=\"list\" SIZE=4>
<OPTION VALUE=\"Highest\">Highest
<OPTION SELECTED VALUE=\"High\">High
<OPTION VALUE=\"Medium\">Medium
<OPTION VALUE=\"Low\">Low
</SELECT><P>
Please indicate your day of the week:<P>
<INPUT TYPE=\"radio\" NAME=\"radios\" VALUE=\"1\" CHECKED>Sunday
<INPUT TYPE=\"radio\" NAME=\"radios\" VALUE=\"2\">Monday
<INPUT TYPE=\"radio\" NAME=\"radios\" VALUE=\"3\">Tuesday
<INPUT TYPE=\"radio\" NAME=\"radios\" VALUE=\"4\">Wednesday
<INPUT TYPE=\"radio\" NAME=\"radios\" VALUE=\"5\">Thursday
<INPUT TYPE=\"radio\" NAME=\"radios\" VALUE=\"6\">Friday
<INPUT TYPE=\"radio\" NAME=\"radios\" VALUE=\"7\">Saturday <P>
Thank you for filling out our Survey. Please indicate how
much unsolicited mail you like to get.
<SELECT NAME=\"popupmenu\">
<OPTION VALUE=\"Very much\">Very much
<OPTION VALUE=\"A lot\">A lot
<OPTION VAlUE=\"Not so much\">Not so much
<OPTION VALUE=\"None\">None</SELECT><P>
<INPUT TYPE=\"hidden\" NAME=\"hiddendata\" VALUE=\"Rosebud\">
<CENTER><INPUT TYPE=\"submit\" NAME=\"submit\">
<INPUT TYPE=\"reset\"></CENTER><HR></FORM>";
print &HtmlBot;
Дата добавления: 2016-04-02; просмотров: 491;