Thomas Müller: Checkboxen checked vor Absenden überprüfen

Beitrag lesen

Nur um dir das mal zu zeigen:

$data=mysql_query('SELECT * FROM '.$table) or die(mysql_error());

while($output=mysql_fetch_assoc($data)) {
     echo "<tr>";
      echo "<td width="25%">";
       echo $output["name"];
      echo "</td>";

echo "<td width="10%">";
       $x=$output["typ"];
       echo $types[$x];
      echo "</td>";

echo "<td width="5%" align="right">";
       echo $output["status"];
      echo "</td>";

echo "<td width="25%">";
       echo "<a href="".$output["link"]."" target="_blank">".$output["link"]."</a>";
      echo "</td>";

echo "<td width="30%" align="center">";
       echo "<a href="?action=edit&edit[]=".$output["id"]."">Bearbeiten</a> &#8226; ";
       echo "<a href="?action=confirm&edit[]=".$output["id"]."">Freischalten</a> &#8226; ";
       echo "<a href="?action=delete&edit[]=".$output["id"]."">L&ouml;schen</a>";
      echo "</td>";

echo "<td width="5%" align="center">";
       if($checkall==1) echo "<input type="checkbox" name="edit[]" value="".$output["id"]."" checked>";
       else echo "<input type="checkbox" name="edit[]" value="".$output["id"]."">";
      echo "</td>";
     echo "</tr>";
    }

Und jetzt sag mir mal, wie ich da wissen soll, wieviele checkboxen ich habe!