You can set your flags in one array after submitting the form by adding []
an attribute to the end name
, for example:
<input type="checkbox" name="services[]" value="Podcasting Services" />
Podcasting Services
<input type="checkbox" name="services[]" value="Local Search" />Local Search
, $_POST['services']
, . :
#var_dump($_POST['services']);
array(2) {
[0]=>
string(19) "Podcasting Services"
[1]=>
string(12) "Local Search"
}
, , , ether foreach()
implode()
, .
, !