- From: <kgeorge@tcpsoft.com>
- Date: Tue, 22 Dec 1998 16:30:50 -0500 (EST)
- To: Taco IJsselmuiden <taco@ch.twi.tudelft.nl>
- CC: www-html@w3.org
Taco - "%26" is all you need. 0x26 is 38 in decimal which is the ascii code for the "&" character. Download the html/http spec(s) from somewhere and read about URL encoding. Of course, you will have to un-encode the number when you get it ... but that is fairly trivial. char *p = "%26"; char c = 0; if (*p == '%') { p++; if (isdigit(*p) && isdigit(*(p+1))) { c = ((*p - '0') * 16) + (*(p+1) - '0'); p += 2; } } Kyle George kgeorge@tcpsoft.com Taco IJsselmuiden wrote: > > Hi, > > Is there any way to define the separator (&) used when using a form ?? > (i.e.: > <form action=cgi.cgi method=get> > <input type=text name=one value="something"> > <input type=text name=two value="another thing"> > <input type=submit value="submit"> > </form> > > would result in this url: > http://..../cgi-bin/cgi.cgi?one=something&two=another+thing > ) > > The problem with this is, that & has a special meaning in HTML, so using > such an URL in a HTML-page is not perfect. > I could use (i.e.) ; as a separator in the HTML-page, but still most UA's > use & when data is submitted trough a form. That's not very practical, > having two different separators. > > Greetings, > Taco.
Received on Wednesday, 23 December 1998 06:08:12 UTC