Submit values and redirect user from to external URL
You can generate form like that using '#type' =&gt; 'hidden' form API fields, and using '#action' on form itself.

If you want to submit values to Drupal and then redirect user to external site, you cannot do it directly. HTTP protocol does not allow you to send anything from your server to another "on behalf" of your user. The only way to do it is:


Get data from user
Save data, process it, do whatever you need
Generate form with action pointing to external service (usually payment gateway), and data required by it in hidden fields
Use JavaScript to make user's browser submit it.


If you are trying to do it using drupal_http_request, it's your server that starts payment procedure, not client's browser - certainly not what you want. And payment server will not allow switching procedure between different computers - it would be a security risk to allow that. If you could hand your session on payment server to your user, what would prevent attacker from doing the same (but with his bank account, not yours)? I know that's simplified explanation - for more details you may try to ask on Information Security.