You need to do two steps:
- use PHP code to check if the box is checked
<input type="checkbox" name="Include_In_Search_Results" value="Yes"
<% if ($Include_In_Search_Results == "Yes") {echo "checked";} %>>
This example above assumes you have a field in your database called Include_In_Search_Results and you are using a checkbox in a form to make this field equal "Yes" for checked or no for not checked.
Now before you can add the record you have to ensure that Include_In Search_Result equals no because if the check box is not checked in the form, no value is passed for Include_In_Search_Result. Use the following before you send the data to be added:
if ($Include_In_Search_Results != "Yes") {
$Include_In_Search_Results = "No" ;
}
Good Luck