Make the php page output your variable with a simple "echo".
In Flash you have to use something like:
loadVariables("your_php_page.php",0);
Let's say your text field in flash has a variable named "my_var" asigned, then you would need a php page like this:
<?php
echo "$my_var = hello";
?>
Make sure there are no line breaks between the opening php tag and the beginning of the page, because that would make the loadVariables statement to fail.
Once you have your variables loaded, you could generate your buttons with duplicateMovieclip.