Welcome to WebmasterWorld Guest from 54.146.201.80

Forum Moderators: incrediBILL

Message Too Old, No Replies

how to assign associate array to field input

     
8:59 pm on Oct 22, 2010 (gmt 0)

Preferred Member

5+ Year Member

joined:June 19, 2006
posts: 476
votes: 0


<input type="checkbox" name="color[]" value="" />

I know this will get a regular array but how to do associative?

? <input type="checkbox" name="color['color_id']" value="" />
11:27 am on Oct 23, 2010 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


as far as i know that won't do anything for you in HTML.
you might try either hacking a form element name attribute value that can be processed in the script (... name="color:color_id" ...) or defining the associativity with some hidden input parameters.


http://www.w3.org/TR/REC-html40/types.html#type-cdata [w3.org]:
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members