8-channel relay board code

You say you are a newbie, and your question certainly shows it. I suggest you take some smaller bites of arduino before you try to swallow a cow. Go find some examples which show you how to interface to a pushbutton, and spend a little time getting the basics of electricity in your head. Trying to start with an advanced project just leads to frustration. With two weeks of evening study, you could know enough to do this without somebody else donig it all for you. Where's the fun in that?

Bear in mind, I'm not criticizing you: I'm just trying to make your arduino journey a lot more satisfying. Slow down and enjoy it.