Security Panel login

Hi everyone, I’m very new to flash and have only created a few flash websites freelance.
I’m currently playing with the idea of having a keypad style login for a site.
What I would like to achieve is the person enters their code to access the site by clicking
on the numbered keypads and hitting the enter button. I would also like the code they
enter to display in a dynamic text box. I have buttons setup like a keypad 1-9 Clear and Enter which when pressed add the specific number to a dynamic text box. I going to use PHP and mySQL when the person clicks on the enter button to check the dynamic text box for a legitimate code.

My first stumbling block is apon clicking another button it replaces the data allready in the dynamic text box instead of just adding to it. Any help would be most grateful.