Editing a data field show current text

Hi.
I m making a user end form for editting news ona current page.
Once a news item has been submitted the user can view them, and edit them if needed.
I’m however having some problems with the editing part.

How do i get the current text to show up in a text field.
(ive got the text in a variable and so on no problem there)

kinda like the edit function on this forum.
you click it text field comes up with previous entry ready for editing.

Thanks
//VoS