#!/usr/bin/perl BORN in the USSR, use USR and not OPT (OPie Taylor) --- -- - --- --- -- - require "subparseform.lib"; &Parse_Form; $color = $formdata{'whatColor'}; print "Content-type:text/html\n\n"; print "\n\nColor is $color"; print "\n\n"; if ($color eq "red") { $RGB = "FF0000"; } elsif ($color eq "green") { $RGB = "00FF00"; } elsif ($color eq "blue") { $RGB = "0000FF" } elsif ($color eq "purple") { $RGB = "FF00FF" } elsif ($color eq "lightp") { $RGB = "FFAAFF" } elsif ($color eq "yellow") { $RGB = "FFFF00" } elsif ($color eq "white") { $RGB = "FFFFFF" } else { $RGB = "ABCDEF"; } print " \n

RGB triplet was: $RGB

\n"; print " \n \n\n"; 1. How would you modify this CGI script so that it would process the additional multiple choice value "custom" by going to the value the user typed into a text box named customRGBtriplet to get the 6 character value of their choice? 2. Modify the original
and the HTML so that it includes the additional choice on the menu, along with suitable text the user sees on the page, and it includes the textbox and a suitable prompt for what it is for. Mark's test page on student.cns.uni.edu in cdmtest account

Mark's testing on student.cns.uni.edu in cdmtest account


Please pick one of the following colors: