Question: (a) Modify the code of Figure 14.15 (Example 14.35) so that it replaces the form with its output, as the CGI and PHP versions of
(a) Modify the code of Figure 14.15 (Example 14.35) so that it replaces the form with its output, as the CGI and PHP versions of Figures 14.11 and 14.14 do.
(b) Modify the CGI and PHP scripts of Figures 14.11 and 14.14 (Examples 14.30 and 14.34) so they appear to append their output to the bottom of the form, as the JavaScript version of Figure 14.15 does.
Figure 14.11:

Figure 14.14:

Figure 14.15:

Adder Adder 12 First addend 34 Second addend First addend Second addend Submit #!/usr/bin/perl use CGI qw(:standard); SargA = param("argA"); $argB = param("argB"); $sum = $argA + $argB; # provides access to CGI input fields print "Content-type: text/html "; print " "; print " "; print " Sum "; print " $argA plus $argB is $sum "; print " "; Sum Sum 12 plus 34 is 46 12 plus 34 is 46
Step by Step Solution
3.37 Rating (175 Votes )
There are 3 Steps involved in it
a b a This modified version of Figure 1415 replaces the form with its output The form is rem... View full answer
Get step-by-step solutions from verified subject matter experts
