Sending with rawurlencode

I have a basic search box that is going to send a request to another url (not on my site) the data has to be url encoded. My question is where does the php code go for the variables that are being encoded. Does it go inside the form tags before the submit, I am working this out on paper and my head so I don’t have the code yet. Any general steps would be appreciated.

Are you a) using a GET string to pass on the search terms

// eg

or are you b) processing the string on the backend with PHP and then POSTing the request onto the other website?

or are you c) doing something else?

What i am trying to do is search ICANN for domain names (this is beyond my current abilities) but Iam trying to figure it out. I am using the POST method with a $_SERVER[‘PHP_SELF’] action,
I have to include 4 fields with the url when it is sent to ICANN, thus the rawurlencode. Im not clear on how to get the domain name out and on its way to ICANN. At the moment my thought is to set the field names as variables to attach to the url with rawurlencode, and here is were I’m lost all examles I’ve seen use echo to print out, that is not what I want to do. I want it to go to ICANN search the domain names and then post the results on the orginal page. I don’t know if this makes any sense if not I will try to explain it better. Thanks!!

If you are building a GET string to pass on to ICANN then [fphp]http_build_query[/fphp] might save you some time if you are generating it from an array.