Re: following radio & hidden does not work..... help please.



On Fri, 30 May 2008 23:45:47 +0200, Paul Lautman <paul.lautman@xxxxxxxxxxxxxx> wrote:
dba wrote:
using the following code with a problem....

echo "<input type='hidden' name='member_id'
value=\"{$row[0]}\">{$row[0]}";
echo "<input type='radio' name='member_name'
value=\"{$row[1]}\">{$row[1]}<br />";

The post_data.php program posts the following

member id is: 0009
member_name is: Ralph Jones
cccb_name is: Annexation Committee

Everything is ok but the member id. The number listed '0009' is the
number of the last name in the returned result. It is NOT the number
listed with Ralph Jones which is '0007'.

This works the same with a radio button or a select statement.
Any help will be appreciated.

I'm terribly sorry, my crystal ball is in the workshop. Maybe someone else's
crystal ball is working and they can see your code which produces this..

Hmmm, reading the original post, doing some crystal balling, the OP doesn't get what the difference between hidden inputs & radio's are. Default UA behvior is to send the last value of an hidden input with the same name, and only the selected radio button. One cannot expect a different hidden input to be sent just solely based on a different radio being selected.

Damn you Paul, for bringing a nicely plonked post to my attention, and damn me for the addiction to still need to answer it... That's it, no more usenet for me today, a beer & a movie it is.
--
Rik Wasmus
....spamrun finished
.


Quantcast