I have created a registration form.

I want to use a check box with my registration form. If the user checks the box I want to enter a values of yes into my database table when the user submits the form. If the check box is unchecked I want to enter no. How do I code this ?