Mailinglisten-Archive |
Thomas Winter schrieb:
> print "<input type='checkbox' name='cbutton[1]' value='yes' />";
> print "<input type='checkbox' name='cbutton[2]' value='yes' />";
>
> Wäre das hier eine korrekte Abfrage ob eine bestimmte Checkbox markiert wurde:
>
> if ( isset($_REQUEST['cbutton']) and
> array_key_exists('1', $_REQUEST['cbutton']) and
> $_REQUEST['cbutton'][1] == 'yes') {
> print "<br>Button 1 gedrückt" . $_REQUEST['cbutton'][1];
> }
es reicht
if (isset($_REQUEST['cbutton']) && isset($_REQUEST['cbutton']['1'])) {
...
--
Sebastian Mendel
www.sebastianmendel.de
php::bar PHP Wiki - Listenarchive