#! /usr/bin/perl

use CGI ':standard';
use CGI::Carp "fatalsToBrowser";

# W. Sterner CS101   -- Homework 5, problem 2c -- Final Output of Data

#2. Hidden Fields (25 pts.) 


    print header, start_html('Using Hidden Fields to pass User Data 3');
print br;

$uName=param('name'); #get CGI variables passed into progr.
$state=param('STATE');
$first=param('movie1');
$second=param('movie2');
$third=param('movie3');



if ($state eq 'FILMS' ){
    print "Hello, $uName <br/><br/> Here is your list of three favorite movies.";
    print br,br, "You liked $first the most.";
    print br, br, "Then came $second as a close runner-up.";
    print br, br,  "And $third just made the cut.";
   
}
else { print "ooops Get help! state=$state";}

print end_form, end_html;
