Программирование => PHP => Тема начата: от 07 Мая 2002, 22:23:26
Название: checkbox
Отправлено: от 07 Мая 2002, 22:23:26
function MakeCheckBoxes($Name=array(),$values=array(),$answers=array(),$Checked=array()) { $ArrayCount = count($answers); $result = \'\'; for($i=0;$i<$ArrayCount;$i++) { $result.= "if ($answers[$i]==$Checked) $result.= " Checked>$answers[$i] "; else $result.=">$answers[$i] \\n"; } return ($result); } this is a function of checkboxes (23 checkboxes: checkbox1, checkbox2.....) when i submit the form(which has various fields also) checked checkbox doesnt keep its value (i have to check checkbox again), otherwise it will not count the value of checkbox.
Название: checkbox
Отправлено: Dm от 07 Мая 2002, 22:54:17
лучше сделать так, как рекомендовано тут: http://php.spb.ru/php/form.html
PS. Kara, просьба, по возможности в русский форум писать по-русски.