A few requests

Well, I don’t have much info to code from, but assuming you’re using MySQL’s MD5 function and taking liberties with what might be the format in which you’ve stored the security question answers:

userAnswer = event.source.parent.getComponent("AnswerTextBox") userName = fpmi.security.getUsername() affected = fpmi.db.runPrepStmt("UPDATE StoredAnswers SET Username=Username WHERE Username=? AND MD5(?)=CorrectAnswerHash", [userName, userAnswer]) if affected==0: fpmi.gui.warningBox("Incorrect answer") else: fpmi.gui.messageBox("You got it!")

This logic uses a bit of a trick. It issues an UPDATE query that does nothing (setting username=username), and checks how many rows it modified. If it is zero, the answer didn’t match, otherwise it did.