Im sure this is an easy question

I feel stupid for even asking this, but I need to make a button that checks to see if the “password” and the " confirm password" fields are the same, how would i do that?