#!/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