I'm not sure that too many people know how to do that. It's not just a rewrite, you need to change the DNS setting too.
Firstly, any subdomains you plan to use need to resolve. Build yourself a list, and set them up in your DNS. Now that all subdoms resolve to a single IP, you need to set up a named Vhost that handles all requests to *.mysite.com (or if you have a seperate IP you could make it IP based) THEN you can use a mod_rewrite script to map the subdomain requested to an a POST/GET arg as you describe. No matter how you approach it, you'll have to sort the first two steps above. After that, its up to you whether you use mod_rewrite, or a customized app/script to handle requests (at least with mod_rewrite, you don't have to change your script.) Good luck JL