Why do you want to pass it through a query string ?
Don't forget that query strings have a limit on the number of chars that they can hold (can't remember the figure).
You'd be best off passing via a POST rather than a GET.
If however you must pass it through a GET then the previous posts suggestion would work also you may want to look at the function rawurlencode - its designed specifically for that use.
HTH
GM