Автор Тема: checkbox  (Прочитано 1893 раз)

0 Пользователей и 1 Гость просматривают эту тему.

  • Гость
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.

Оффлайн Dm

  • Модератор
  • Глобальный модератор
  • Ветеран
  • *****
  • Сообщений: 1263
  • +0/-0
  • 0
    • Просмотр профиля
    • http://
checkbox
« Ответ #1 : 07 Мая 2002, 22:54:17 »
лучше сделать так, как рекомендовано тут:
http://php.spb.ru/php/form.html


PS.
Kara, просьба, по возможности в русский форум писать по-русски.
с уважением,
магистр белой магии.

 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28