Php Get requests, problem with spaces...i think!!?

  • Thread starter Thread starter Michael N
  • Start date Start date
M

Michael N

Guest
Hey all,

I'm having a problem with a get request in php. I have to send a get request to return a ID number but when i send the request with a space in it i get weird results. Its probably easier to show the code:

If I send this request:

GET /data/home/energy/ireland/suppliers/drill?supplier=ESB

I get:

RESOURCES
DRILLDOWNRESOURCE
DATACATEGORY UID=DEB6531FF5B3
NAME
Suppliers
PATH
suppliers
ITEMDEFINITION UID=C5117143449E
SELECTIONS
CHOICE
NAME
supplier
VALUE
ESB
CHOICES
NAME
uid
CHOICES
CHOICE
NAME
4E5B3CD9283F
VALUE
4E5B3CD9283F

However if i send:

GET /data/home/energy/ireland/suppliers/drill?supplier=Bord Gais

This is returned:

RESOURCES
DRILLDOWNRESOURCE
DATACATEGORY UID=DEB6531FF5B3
NAME
Suppliers
PATH
suppliers
ITEMDEFINITION UID=C5117143449E
SELECTIONS
CHOICE
NAME
supplier
VALUE
Bord
CHOICES
NAME
uid
CHOICES


Now the information returned should be similar but in the case of the second one the values are missing. The only reason i can think that this is happening is due to the space between "Bord Gais" in the second GET request. Can anyone tell me how i can get around this?

If i can make my problem any more clearer ill try,

Mike
 
Back
Top