username in form?

how can i make it that a username is automatic filled in in a form?
adding 'USERNAME' => $userdata['username'], in the php file and {USERNAME} in the form in the template does not work...
it just shows {USERNAME}
help please i'm stuck here...
adding 'USERNAME' => $userdata['username'], in the php file and {USERNAME} in the form in the template does not work...
it just shows {USERNAME}
help please i'm stuck here...