Mailinglisten-Archive |
On Wednesday 20 March 2002 18:03, Bernhard Schimanski wrote:
> - Checkbox,
> ich habe ein Problem mit "Checkboxs", wenn ich mehrere Boxs in einem
> Formular habe, und sie zur nächste Seite weiter geben möchte, wie kann ich
> sie auf Gültigkeit prüfen ?
>
> Checkbox zählen und Bilder hochladen
>
> <form action="checkbox.php" method="POST">
> <table border="0">
> <tr>
> <td>Box 1 </td>
> <td><input type="checkbox" name="Nr1" value="box1"> </td>
> <tr>
> </tr>
> <td>Box 2 </td>
> <td><input type="checkbox" name="Nr2" value="box2"> </td>
> </tr>
> <tr>
> <td>Box 3 </td>
> <td><input type="checkbox" name="Nr3" value="box3"></td>
> </tr>
> <tr>
> <td>Box 4 </td>
> <td> <input type="checkbox" name="Nr4" value="box4"> </td>
> </tr>
> </table>
> <input type="submit" name="senden" value="Senden">
> </form>
>
> Sie alle in ein Feld reinstecken ?
> "$feld = array($Nr1, $Nr2, $Nr3, $Nr4);"
gib doch einfach den checkboxen die name so, dass es nachher automatisch in
einem array verfügbar ist, das wäre dann so:
<input type="checkbox" name="Nr[]" value="box2">
--
Wolfram
... translating template engine ....
http://sf.net/projects/simpletpl
php::bar PHP Wiki - Listenarchive