> 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)
Suggest using 1, 0 instead for 1,2 for all the above.
and default selected 0, then in your main script,
you can simple say :
if (not $option1) { do_sth } # when selected 0
if ($option1) { do_sth } # when selected 1
> 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)
print "Content-type: text/html\n\n";
# Do sth to get those vals
if (($opt1 or $opt2 or $opt3 or $opt4) and ($opt5) and ($opt6 >= 2 ))
{ print "Success" } else { print "Fail" }
>
> 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)
I don't understand. =)
>
> The user fails in the following conditions:
> Option5=No and Option6<2
> Option1=2 and Option2=2 and Option3=2 and Option4=2
Actaully, I think you don't need to do it on "twice", say,
if not ok, that is fail, fullstop.
>
> 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")) {
for numeric check, use ==, >=, <=, !=
[...]
Rgds,
Connie
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]