Re: Need help with reading values from a form

From: Date: Fri, 16 Nov 2001 15:20:30 +0000
Subject: Re: Need help with reading values from a form
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74885@lists.php.net to get a copy of this message
name the checkbox as: <input type='checkbox' value='<?=$field['id']?>' name='selectedplayers'> where ID is used to identify this current field! then read in the posted page as: <? while (list(, $selected) = each($selectedplayers)) { // $selected holds the ID of the field that was previously selected // do whatever here! } ?> "P. Roescher" <p.roescher@home.nl> wrote in message news:000001c16eab$65226360$0100005a@cc48693a... > The script I have: > <? > $query = "SELECT * FROM members ORDER BY MemberName ASC"; > $player = MYSQL_QUERY($query); > $Aantal_play = MYSQL_NUM_ROWS($player); > $x=0; > while ($x < $Aantal_play) : > $name = mysql_result($player,$x,"MemberName");$name = $name + > "NAME"; > ?> > <tr> > <td width="25%" height="18"> > <font face="Verdana" size="2" color="#FFFFFF"><? > print $name; > ?></font> > </td> > <td width="75%" height="18"> > <input type="checkbox" name=<?print $name?> value="ON"> > </td> > </tr> > <? > $x++; > endwhile; > ?> > The Problem I have: > How can i read all checkboxes?!? > >

« previous php.general (#74885) next »