in reply to Re: Re: Re: Key/Value Problem
in thread Key/Value Problem

Thanks so much for your insights. The code you propose makes sense, but whenI run it with my form, it doesn't seem to actally get any of the answers provided. I created the @fiels array using the names that I use in the form (i.e. 'name','01','02','03' etc....). In my form, I have about 20 different elements that are radio button choices, so for question 2 it might be something like:
<input type="radio" name="02" value="a"> Required in my major </td> <td> <input type="radio" name="02" value="b"> Required, not in my major </td> <td> <input type="radio" name="02" value="c"> An Elective </td>
When the user picks the third option (value="c"), then I want that to show up for the value of field (name) "02". If they don't choose any of the options, then it will be a comma. When I test the code you suggest, I get a comma for every answer, whether I selected anything or not. Any ideas? I really appreciate all the information as I wade through this.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Key/Value Problem
by suaveant (Parson) on Apr 19, 2001 at 23:00 UTC
    print out $name before you put the value in the hash... does it look right?

    repost your new code... maybe its something simple...
                    - Ant