cely script
Kód:
echo "<div id=\"content_container\"><div id=\"novinky\"><form action=\"$_SELF\" method=\"POST\" name=\"polozka\">";
$query3 = "SELECT id,nazov,nazov_uprava From menuhor";
$result3 = mysql_query($query3);
while($row3 = mysql_fetch_array($result3)){
$num = num(menuleft,nazov,$row3[id]);
echo "<table align=\"center\" width=\"100%\" border=\"0\">
<tr align=\"left\">
<td colspan=\"100%\" id=\"ciara\">
<p><b>$row3[nazov]</b></p>
</td><
<td align=\"right\" id=\"ciara\"><input type=\"checkbox\" name=\"".$row3[nazov_uprava]."\" value=\"$row3[nazov_uprava]\"></td>
</tr><tr><td><table>";
$query2 = "SELECT id,nazov From menuleft WHERE idd='$row3[id]'";
$result2 = mysql_query($query2);
$c = 0;
while($row1 = mysql_fetch_array($result2)){
$c++;
echo "<tr><td style=\"padding-right: 100px\"></td><td width=\"84%\"><p>$row1[nazov]</p></td>
<td align=\"right\"><input type=\"checkbox\" name=\"".$row3[nazov_uprava].$c."\" value=\"$row1[id]\"></td>
</tr>";
}
echo "</table></td></tr>";
}
echo "</table></form></div></div>";
zbezne, vytiahnem z databazi nieco k comu dam checkbox a ktomu vytiahnem zase nieco k comu priradim pod checkboxy, a ja by som potreboval, ze ked kliknem na hlavny checkbox, tak to oznaci vsetky podcheckboxy.
skusal som rozne kombinacie, ale nejako mi to nefungovalo.