Salve, ho questo codice come posso fare ad trasformarlo in una funzione senza l'html ma solo il codice che recupera i valori.?
ecco il codice:
codice:
<form action="test.php" method="post">
<input type="checkbox" name="check_list[]" value="value 1">
<input type="checkbox" name="check_list[]" value="value 2">
<input type="checkbox" name="check_list[]" value="value 3">
<input type="checkbox" name="check_list[]" value="value 4">
<input type="checkbox" name="check_list[]" value="value 5">
<input type="submit" />
</form>
<?php
if(!empty($_POST['check_list'])) {
foreach($_POST['check_list'] as $check) {
echo $check;
}
}
?>
grazie mille e scusate della banalità ma non so come fare.
grazie mille di nuovo.