This really depends on how variables are defined in your controller, and how they are displayed in your view file.
If you want to hide/clear the values in your forms you can:
- Reload the page: create a redirect at the end of your
if (isset($_POST['del_btn']) && $_POST['del_btn']){
statement that sends the user back to the new page. - Use jQuery to hide divs where the checkbox is checked.
- Redefine variables in your controller after the post to be NULL.
- Add a ternary operator to your values in the view so for example
<input name="form_input" type="text" value=<?=isset($_POST['del_btn'] ? NULL : $form_input?>>
which means that the form will display as NULL when the del_btn is submitted.