Undetermined number of radios to be 'remembered'

From: Date: Thu, 11 Oct 2001 18:52:56 +0000
Subject: Undetermined number of radios to be 'remembered'
Groups: php.general 
Request: Send a blank email to php-general+get-70842@lists.php.net to get a copy of this message
Hi All, I have a form with radio buttons: <input type="radio" name="peso_<?php echo $infotec_id; ?>" value="0"> <input type="radio" name="peso_<?php echo $infotec_id; ?>" value="1"> These radios come from a while loop that determine the $infotec_id variable. So I have multiple buttons, with names like 'peso_1', 'peso_2', 'peso_3'. When submitted, and undetermined number of radio buttons named 'peso_X' will be created. The X on 'peso_X' also is a value from a checkbox that goes along with the radio buttons. Bigger picture: A checkbox with several 'pesos' attached to it, so people can 'rate' the checkboxes they have marked. But if they submit the form, when they get back, the radio buttons that they selected must be checked. I don't know how to do this with an undertermined number of radio buttons labeled 'peso_X'. I know I should register what 'peso_X' in a session, so if they hit back, the form 'remembers' what they have checked. But I can't figure out how to know when the 'X' is 'X' so I can register a name that on the form, will be remembered. Anyone have any ideas how I might do it? -- Julio Nobrega A hora está chegando: http://toca.sourceforge.net

« previous php.general (#70842) next »