homepage Welcome to WebmasterWorld Guest from 54.166.53.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
how to assign associate array to field input
drooh

5+ Year Member



 
Msg#: 4220625 posted 8:59 pm on Oct 22, 2010 (gmt 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="" />

 

phranque

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



 
Msg#: 4220625 posted 11:27 am on Oct 23, 2010 (gmt 0)

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 (".").

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved