MySQL, Flash, PHP, and AS2

I know this is possible, but I have no idea how to do it. How can I hook up a Flash login system which logs in to a Flash game to a MySQL database, so my testers can save their game to the database.

Thanks in advance.