![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| Tags: |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |||
| [SOLVED] Perl web programming newbie? I need to create a short script that will take the user input of square footage and, based on coverage of 500 sq feet per unit, tell the user how many units they need...this is a homework assignment. This is coverage.pl: #!/usr/local/bin/perl print "HTTP/1.0 200 OK\n"; print "Content-type: text/html\n\n"; ################################## #This will give the user the #number of detectors they would #need to have full coverage ################################## $sqft=$FORM{sqft}; $answer= $sqft / 500; print << ENDHTML; <HTML> <HEAD> <TITLE>How many detectors will you need?</TITLE> </HEAD> <BODY> <form method="post" action="coverage.pl"> How many square feet do you wish to cover? <input type="text" name="sqft" size="18"> <input type="submit" name="send" value="How Many I Need"> <br> You will need $answer detectors. </form> </BODY> </HTML> ENDHTML I want the page to post back to itself and display the number of detectors needed. |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |