What is the potential issue with passing multiple checkbox values in PHP forms?
When passing multiple checkbox values in PHP forms, the potential issue is that only the checked checkboxes will be included in the form submission. This means that if a checkbox is left unchecked, its corresponding value will not be passed to the PHP script. To solve this issue, you can use array notation in the name attribute of the checkboxes so that all values are passed as an array to the PHP script.
<form method="post" action="process_form.php">
<input type="checkbox" name="colors[]" value="red"> Red
<input type="checkbox" name="colors[]" value="blue"> Blue
<input type="checkbox" name="colors[]" value="green"> Green
<input type="submit" value="Submit">
</form>
```
In the PHP script (process_form.php), you can access the selected checkbox values as an array:
```php
$selectedColors = $_POST['colors'];
foreach($selectedColors as $color){
echo $color . "<br>";
}