LiangTyan Fui wrote: > > On 10/29/01 11:09 PM, eugen helbling wrote: > > > Hi LiangTyan, > > just to demonstrate that the new "split"(I like them) can do in case of > > duplicate removing. > > > > for example you have a field/variable having something like > > "nameA,firstnameB" & cr & "nameA,firstnameC" > > in it, you can use "split" handler to select names witout duplicates. > > > > get "nameA,firstnameB" & cr & "nameA,firstnameC" > > split it by return and comma > > get the keys of it -- in it you have "nameA" only one time > > This could be a good trick on eliminating duplicate records, but I realised > it could be a problem on URL parsing. > If you try to submit a series of check-buttons or radio-buttons with > browser: > > <html><head><title>MetaCard split test</title></head> > <body> > <form action="http://localhost/cgi-bin/echo.mt" method="get"> > <input type="checkbox" value=1 name="option" checked>Option 1 > <p><input type="checkbox" value=2 name="option" checked>Option 2</p> > <p><input type="checkbox" value=3 name="option" checked>Option 3</p> > <p><input type="submit"> > </form> > </body></html> > > The browser constructs the the following string and pass onto the server: > http://localhost/cgi-bin/echo.mt?option=1&option=2&option=3 > > Suppose you are using a split command to parse the query string in the > echo.mt script: > > put $QUERY_STRING into x > split x by "&" and "=" > put keys(x) into xKeys > > you'll get only "option" in xKeys, and x["option"] gives you "3". > > Hmm..... should I bug report this?
Would you like to have? x["option"]=1 and x["option"]=2 and x["option"]=3 ? I'd say it's normal behavior to retain only the last given value. > > Regards, > LiangTyan Fui Andu Archives: http://www.mail-archive.com/metacard@lists.runrev.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm Please send bug reports to <[EMAIL PROTECTED]>, not this list.