How do I compare two text fields from two forms?

How do I compare two text fields from two forms?

I have written\copied this code below, however, it isn't working. I wonder if it had to do with the fact that they are text fields.
 

if (count (Mrs_Weaver_s_Question_of_the_Day [Question_of_the_Day  == input.Question] ) == 0)

alert "Question of the Day was not listed. Try again later";

cancel submit;

Please advise.