I need help with a little code entry pad.

Basically when a button is hit i want the arduino to register it, save it in attempt[]. and if attempt is equal to pass[] then the light changes