What are the differences between using the "checked" attribute for checkboxes and the "selected" attribute for select options in PHP form handling?

When handling form submissions in PHP, the "checked" attribute is used for checkboxes to determine if they are selected, while the "selected" attribute is used for select options to specify which option is selected by default. When processing form data, you need to check if a checkbox is checked by checking if it is set in the $_POST array, and for select options, you need to compare the selected option value with the submitted value.

// Checkbox handling
$checkbox_value = isset($_POST['checkbox_name']) ? $_POST['checkbox_name'] : '';

// Select option handling
$select_value = isset($_POST['select_name']) ? $_POST['select_name'] : '';
```

In the HTML form, checkboxes use the "checked" attribute to determine if they are selected, while select options use the "selected" attribute to specify which option is selected by default. In PHP form handling, you need to check if a checkbox is checked by checking if it is set in the $_POST array, and for select options, you need to compare the selected option value with the submitted value.

```php
// Checkbox handling
$checkbox_value = isset($_POST['checkbox_name']) ? $_POST['checkbox_name'] : '';

// Select option handling
$select_value = isset($_POST['select_name']) ? $_POST['select_name'] : '';