Not just for Checkboxes and Radio Buttons. You need to set which button was selected by the user, so you have to write PHP code inside the HTML with these values - checked or unchecked. It should be used on your (text, radio and checkbox),