PHP contact form inputs

PHOTO EMBED

Tue Apr 05 2022 08:31:18 GMT+0000 (Coordinated Universal Time)

Saved by @matthewjrallen #php #html #form

<input type="checkbox" name="animal[]" value="Cat" />
<input type="checkbox" name="animal[]" value="Dog" />
<input type="checkbox" name="animal[]" value="Bear" />

<?php

if ( isset( $_POST['animal'] ) ) {
    foreach ( $_POST['animal'] as $animal ) {
        echo $animal;
    }
}

?>
content_copyCOPY

https://stackoverflow.com/a/6881058/3238619