Send to Friend form from flash

I’ve made a million flash forms in which I post the data using loadVariables. I’ve always sent the email with this tag:

$to = "name@domain.com";

With this form I’m making now I need the user to be able to define the e-mail address that the data will be sent to. I post the email with a variable called ‘friend_email’. How do I take that variable and send that data to the specified email? I tried this:

$to = $HTTP_POST_VARS[‘friend_email’];

…and that didn’t work. I suck at PHP pretty bad so I have no idea where to even start. Thanks in advance!