Problem registering domains

Discussion in 'Optigold ISP' started by andyc, Oct 28, 2004.

  1. #1
    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.
     
    andyc, Oct 28, 2004 IP
  2. melfan

    melfan Peon

    Messages:
    644
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I cant understand your problem. Ampersand (&) is used to separate 2 variables in get and post url
     
    melfan, Oct 28, 2004 IP
  3. andyc

    andyc Guest

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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.
     
    andyc, Oct 29, 2004 IP