Re: &-separator from a form

At 6:22a -0800 01/05/99, Greg Marr wrote:
>At 07:01 PM 1/4/99 , Walter Ian Kaye wrote:
>>Actually it's pretty easy -- my CGI library routine counts the '&'s and ';'s
>>between each name=value pair, and compares the counts to determine the
>That's not quite what I meant.  We were discussing:
>How would your cgi handle that?

Well that's invalid anyway. But I guess you meant


which would split to


Hmm... actually it seems my CGI would handle that example properly,
though only by accident. Turns out my code only looks at one item
rather than checking each item. If value2 were where value1 is, then
it would fail. So as long as the first value contains no ampersands,
then it works fine. I could make it smarter, but it's probably not
worth it. ;)

(Sorry folks, didn't expect to get so programmery.)


Received on Tuesday, 5 January 1999 12:58:18 UTC