Re: Retrieving the multiple values set by a form
- From: "Girish" <girishbhat6620@xxxxxxxxx>
- Date: 27 Sep 2006 22:57:18 -0700
And this is how I have worked around this problem. Admittedly this is
not a very elegant solution, but I present it for the benefit of those
who like me fail to find a better solution and will trawl the archives
in search of this very workaround in the future. :-)
In the main form I have,
<input name='"choice0'"type="checkbox" value='"first value">
<input name='"choice1" type="checkbox" value='"second value">
<input name='"choice2" type="checkbox" value='"third value">
etc.
plus a hidden input field
<input name="displayedchoices" type="hidden" value='"3"> //equal to the
number displayed.
In the processing script
$choicesDisplayed = $_REQUEST['displayedchoices'];
for($i=0; $i< $choicesDisplayed; $i++)
{
$read = 'choice'.$i;
$setvalue = $_REQUEST[$read];
echo "Value of $read is ".$setvalue;
echo "<br>\n";
}
Cheers,
Girish
.
- References:
- Retrieving the multiple values set by a form
- From: Girish
- Re: Retrieving the multiple values set by a form
- From: Ron Barnett
- Retrieving the multiple values set by a form
- Prev by Date: Re: open source ajax/php html editors?
- Next by Date: Re: Retrieving the multiple values set by a form
- Previous by thread: Re: Retrieving the multiple values set by a form
- Next by thread: Re: Retrieving the multiple values set by a form
- Index(es):