Witam, mam kod tabelki:
  1. echo "<th width=100 align=center>Data rozliczenia</th>";
  2. echo "<th width=100 align=center>Status</th>";
  3. echo "<th width=100 align=center><div id=noprint>Udostępnij</div></th>";
  4. echo "<th width=50 align=center>";
  5. ?>
  6. <form name="pozycje" id="pozycje" action="aaaa.php" target="_blank" method="post">
  7. <input type="image" style="width: 22px; height: 22px" src="img/ikony/printer.png" alt="Drukuj zaznaczone" title="Drukuj zaznaczone" /></th>
  8. <?
  9.  
  10. echo "</tr>";
  11.  
  12. $i = 0;
  13. $k = $from;
  14. while($r = mysql_fetch_array($wynik))
  15. {
  16. $i++;
  17. $k++;
  18.  
  19. echo '<form method="POST" action="">';
  20. echo '<input type=hidden name="id_odst" value="'.$r[id_odst].'"></input>';
  21.  
  22. echo "<tr>";
  23. ...............................................................
  24. if(($r['status']) == Rozliczony ){
  25. echo "<td width=100 align=center bgcolor=.red.>".$r[status]."</td>";
  26. echo '<td></td>';}
  27. else
  28. {
  29. echo "<td width=100 align=center>".$r[status]."</td>";
  30.  
  31. if ($r['udostepnij'] == 0){
  32. echo "<td width=100 align=center><div id=noprint>
  33. <action=\"rejtest.php\">
  34. <input type=hidden name=a value=udostepnij_on>
  35. <input type=hidden name=\"udostepnij_on\" value=\"0\">
  36. <button type=submit value=Zatwierdź>
  37. <img src=img/ikony/no.png title=\"Niewidoczny\" style=width:15px;height:15px;border:5px; />
  38. </div></button></td>";
  39.  
  40. }
  41. else
  42. echo "<td width=100 align=center><div id=noprint>
  43. <action=\"rejtest.php\">
  44. <input type=hidden name=a value=udostepnij_off>
  45. <input type=hidden name=\"udostepnij_off\" value=\"1\">
  46. <button type=submit value=Zatwierdź>
  47. <img src=img/ikony/ok.png title=\"Widoczny\" style=width:15px;height:15px;border:5px; />
  48. </div></button></td>"; }
  49.  
  50. echo '<td align="center" width="10px">';
  51. echo '<input type="checkbox" name="drukuj[]" value="'.$r[id_odst].'" /></input>';
  52. echo '</td>';
  53.  
  54.  
  55.  
  56. if($r['wydruk']=='1') {
  57. echo "<td width=50 align=center><font color=\"black\"><small>Tak</small></font></td>";
  58. }
  59. if($r['wydruk']!='1') {
  60. echo "<td width=50 align=center><font color=\"red\"><small>Nie</small></font></td>";
  61. }
  62.  
  63.  
  64. ...........................................
  65. }}
  66. echo "</tr></form>";
  67.  
  68. }


Wewnątrz rekordów tabeli mam forma który wprowadza mi zmiany do bazy dotyczące danego rekordu. Teraz chciałbym aby przed pętlą while ustawić jeszcze jeden formularz który "zbierałby" mi wszystkie zaznaczone checkboxy w rekordach poniżej, ale zawsze działa jeden formularz. Wyczytałem że nie powinno się robić forma w formie. Jakie więc inne rozwiązanie byłoby właściwe dla mojego problemu?