Passing variables?

I have been fighting with this for a few weeks now, and i am hoping that someone has an answer to this…

How is it possible, in flash, to have an swf file on a page with a variable in the URL, to send that variable to php and then back to the flash if everything is ok.

I am trying to set it to where, all the user has to do is embed the flash file with the variable …swf?folder=TheVariable in the src. The folder variable will be sent to a php file where it will do some mysql stuff and then if the user’s account is not expired, it will send that same variable back to the swf file. if the user’s account is expired, it will send back my defined variable.

I am not sure if i worded everything right or not, but i just want to send a variable to php from flash and then back from the php to the flash…without refreshing anything.

Please help!!!

Thanks!
Tim