Kamala Harris - Air Force 1 Shoes - US Business Directory - Web directory - Myspace Layouts

PDA

View Full Version : Problem registering domains


andyc
Oct 28th 2004, 3:30 am
The strings passed through to the http post are not URI encoded. Therefore when a field is passed through with an ampersand in, the field is truncated. Try for example and company name of A & J - only the A gets passed to the script.

melfan
Oct 28th 2004, 6:30 am
I cant understand your problem. Ampersand (&) is used to separate 2 variables in get and post url

andyc
Oct 29th 2004, 7:41 am
Exactly my point. So if the field (such as the company name) has an ampersand in it, it will be interpreted as a field separator. So if my code looks like:

http://blah.co.uk/senddomain.php?company=<Company>

and the company name is A & J Cowan, the string that gets passed is

http://blah.co.uk/senddomain.php?company=A & J Cowan

which is interpreted by the script as two fields, not one. The way round this is to URI encode the fields (see http://www.w3.org/International/O-URL-code.html) which would result in the actual string being passed as

http://blah.co.uk/senddomain.php?company=A%20%%2620J%20Cowan

which would be picked up by the script as a single field.

A.