It is probably a bad idea to try to generate SWF from PHP. Instead, make a standard SWF and pass parameters from PHP using the parameter options in the HTML.
If you need to do something more complicated, use actionscript to do http requests to get/put the extra data.
Mark