Musíte name
<select>
takže můžete data používat.
name="food[]"
Takhle
<select multiple="multiple" name="food[]" class="options" id="text area" >
<option value="foodA">foodA</option>
<option value="foodB">foodB</option>
<option value="foodC">foodC</option>
<option value="foodD">foodD</option>
<option value="foodE">foodE</option>
</select>
Pokud pak chcete, aby hodnota byla 0 nebo 1, v závislosti na vybrané nebo ne, můžete ji nahradit následujícím:
$foodA = $_POST['foodA'];
$foodB = $_POST['foodB'];
$foodC = $_POST['foodC'];
$foodD = $_POST['foodD'];
$foodE = $_POST['foodE'];
do
$foodA = 0;
$foodB = 0;
$foodC = 0;
$foodD = 0;
$foodE = 0;
foreach ($_POST['food'] as $value) {
if($value == 'foodA')
$foodA = 1;
if($value == 'foodB')
$foodB = 1;
if($value == 'foodC')
$foodC = 1;
if($value == 'foodD')
$foodD = 1;
if($value == 'foodE')
$foodE = 1;
}