#!C:/perl/bin/perl.exe use CGI; $query = new CGI; $v01= $query->param('v01'); $v02= $query->param('v02'); $v03= $query->param('v03'); $v04= $query->param('v04'); $v05= $query->param('v05'); $pass= $query->param('pass'); $q01= "I feel that I'm a person of worth, at least on an equal plane with others."; $q02= "I feel that I have a number of good qualities."; $q03= "All in all, I am inclined to feel that I am a failure."; $q04= "I am able to do things as well as most other people."; $q05= "I feel I do not have much to be proud of."; @varlist= ("v01", "v02", "v03", "v04", "v05"); @qlist= ("q01", "q02", "q03", "q04", "q05"); print $query->header; print $query->start_html(-title=>'Self-Esteem Test'); print ""; print "
"; if($pass <= 4){ $question= $qlist[$pass]; print " $$question
"; print"Strongly Disagree Strongly Agree


"; for($i = 0; $i <= 4; ++$i) { $variable= $varlist[$i]; print " "; } $pass = $pass + 1; print " "; print ""; print "
"; } else{ print ""; print "
"; print "You've answered all the questions. Click the button below to determine your self-esteem score.

"; for($i = 0; $i <= 4; ++$i) { $variable= $varlist[$i]; print " "; } print ""; } print $query->end_html;