What is the best practice for checking if a checkbox was clicked in PHP?

When working with checkboxes in PHP, the best practice for checking if a checkbox was clicked is to use the isset() function to determine if the checkbox was included in the form submission. This function checks if a variable is set and not null, which can be used to verify if the checkbox was checked.

if(isset($_POST['checkbox_name'])){
    // Checkbox was checked
    // Perform desired actions here
} else {
    // Checkbox was not checked
}