Ok - the entire solution is a bit out of scope for this forum, but I'll haev a go with my limited knowledge of flash.
I assume that this will be working over the web, and that you have the necessary skills etc, but the general idea would be something like this:
You'll need a php script which will be able to process stuf from a query string or post variables. You will need to set up the format of the request beforehand, and make sure you use some error checking so that not just anyone can post to your php script and dump stuff into your database. The PHP will then take any GET or POST variables and format them up to be inserted into your database as you would with any form submission (or something along those lines).
You will also need some actionscript in flash in order to create a button or other action so that when an event occurs it makes a call to a function called getURL();
ie.
getURL("http://blah.com/blah.php", "", "GET");
to send via GET
or
getURL("http://blah.com/blah.php", "", "POST");
to send via post.
This will send out any flash variables you have defined. NB - you can also use this function to set variables in flash from PHP. Just get the flahs movie to call your script, and return a querystring formatted result set i.e.
fred=blah&joe=bloggs
and flash will automagically create those variables with those values.
One final point, is that if flash is being run in a browser it will only download information from the server it was downloaded from itself (if you just run it locally then it can connect to any server). This is a security feature implemented by Macromedia.