Pb with checkbox

From: Date: Thu, 18 Apr 2002 09:19:31 +0000
Subject: Pb with checkbox
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93499@lists.php.net to get a copy of this message
Hello, I've got a little pb with checkboxes. In my form I've got 5 checkboxes which have the same name "sel". When I submit the form and when I display the form variable "sel", it displays the last value only. I cannot catch all the value checked in the form. If I try this code with coldfusion or ASP it displays a coma delimited list of all the values I checked in the form. How to fix this pb with PHP? Thanks My code: <!--- the form ---> <form action="catalog.php" method="post"> <table border="0" cellspacing="0" cellpadding="0"> <?for ($i=1;$i<=$nb;$i++){ <tr> <td align="center"><input type="checkbox" name="sel" value="<?=$attr[Title]?>"></td> </tr> <?}?> </table> </form>

« previous php.general (#93499) next »