Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2012
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use CGI ':standard';
  4.  
  5. #print header(-status=>401, 'WWW-Authenticate' => 'Basic realm="Secure Area"');
  6. print header(-status=>401, 'WWW-Authenticate' => 'Cookie');
  7. print start_html('A Simple Example'),
  8. h1('A Simple Example'),
  9. start_form,
  10. "What's your name? ",textfield('name'),
  11. p,
  12. "What's the combination?",
  13. p,
  14. checkbox_group(-name=>'words',
  15. -values=>['eenie','meenie','minie','moe'],
  16. -defaults=>['eenie','minie']),
  17. p,
  18. "What's your favorite color? ",
  19. popup_menu(-name=>'color',
  20. -values=>['red','green','blue','chartreuse']),
  21. p,
  22. submit,
  23. end_form,
  24. hr;
  25.  
  26. if (param()) {
  27. print
  28. "Your name is: ",em(param('name')),
  29. p,
  30. "The keywords are: ",em(join(", ",param('words'))),
  31. p,
  32. "Your favorite color is: ",em(param('color')),
  33. hr;
  34. }
  35. print a({href=>'../cgi_docs.html'},'Go to the documentation');
  36. print end_html;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement