Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2014
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <HTML>
  2. <BODY>
  3. <H3> Test </H3>
  4. <FORM ACTION=test.pl METHOD=POST>
  5. <p>Please Enter Your Name: </p>
  6. <INPUT TYPE=TEXT NAME="name">
  7. <INPUT TYPE=SUBMIT>
  8. </FORM>
  9. </BODY>
  10. </HTML>
  11.  
  12. use CGI;
  13. my $q = CGI->new;
  14. my $m = $q-> param("name");
  15. print "<html>";
  16. print "<body>";
  17. print "<head><title>form test</title>";
  18. print "</head>";
  19. print "<body>";
  20. print "<form method=POST action=test.pl>";
  21. print "<p>First value: </p> <input type = text name = fst>";
  22. print "<p>Second value: </p> <input type = text name = scd>";
  23. print "<input type = submit>";
  24. print "</form>";
  25. my $fname = $q->param("fst");
  26. my $fname2 = $q->param("scd");
  27. my $tot = $fname+$fname2;
  28. print "<h2> hi $m your total value is: $tot</h2>";
  29. print "</body>";
  30. print "</html>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement