Paypal and "name your price" downloads

I am trying to setup a way to sell my music downloads through paypal with a “name your price” method.

I want to use a textinput component. If the person types 0 (zero), it will take them to the DOWNLOAD PAGE. If they type in any other positive number, it will take them to paypal with that amount as the unit price.

This is an editable link to a paypal item:

https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=sale@website.com&lc=US&item_name=item name&amount=1234%2e00&currency_code=USD&button_subtype=products&no_note=1&no_shipping=1&rm=1&bn=PP%2dBuyNowBF%3abtn_buynow_SM%2egif%3aNonHosted

within that link, there is a code for the price. it its “amount=1234”

is there any way i could make it that whatever the person types into the textinput will be put into that code and then they are sent to that link?

some people recommended php and html, but i feel like i could do this in flash. thanks.