Hi TroyH and welcome to the monastery. Your question is a bit vague and does not really give enough info to give a proper answer (see How do I post a question effectively?). Is the form a web form or some type of console input. If console, I'd hazard a guess that the input has a trailing newline that needs to be chomped. Other than that, I think you'd need to reduce your comparison code to a simple test case and post it back here ... could be a problem with your comparison (ahh ... the many times I used = instead of == or eq).