I have a form with 7 fields, each having it's own dropdown menu.
The fields are:
option1: (1, 2)
option2: (1, 2)
option3: (1, 2)
option4: (Yes, No)
option4A: (1, 2)
option5: (Yes, No)
option6: (1, 2, 3, 4, 5,6)
I am using this form to evaluate the eligibility of the user based on the
input.
The user passes in the following conditions:
There are 2 simple requirements:
One of the fields (options1, option2, option3,option4A) are equal to 1
and (option5=Yes or option6>2)
So, we have:
Option1=1 and (option5=Yes or option6>2)
Option1=2 and option2=1 and (option5=Yes or option6>2)
Option1=2 and option3=1 and (option5=Yes or option6>2)
Option1=2 and option4=Yes and option4A=1 and (option5=Yes or option6>2)
The user fails in the following conditions:
Option5=No and Option6<2
Option1=2 and Option2=2 and Option3=2 and Option4=2
Now, here is what I am trying to get after the data is analyzed:
All I want is to display a page that says Passed, or Failed with a message.
Below is what I have so far:
As you can see it's not completed yet, but I am not sure if I am doing it
correctly and if there is another (better or easier way), and I am also
confusing myself!
sub html_fail {
if (($option5 eq "Yes" and $option1 eq "1") || ($option5 eq "Yes" and
$option2 eq "1") ||($option5 eq "Yes" and $option3 eq "1") || ($option5 eq
"Yes" and $option4A eq "1")) {
print <<"END_HTML";
good
END_HTML
}
elsif ($option5 eq "No" and $option6 > 1 and $option1 eq "2") {
print <<"END_HTML";
good
END_HTML
}
else {
print <<"END_HTML";
bad
END_HTML
}
}
Any help would be greatly appreciated.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]