Re-populate form after failed validation and for editing (only one form).

FernandoBasso

in line 22, and the function 'oldval()' is in helpers/helpers.inc.php'.

Now, I need to repopulate the form for editing the user details. I just select the
data from the database based on the user's id and repopulate the form with that data.

The problem is that I need to put the data inside the form's "value" attribute but I can't
figure out how to do that for both situations (after form validation fails and edit user)
using the same form.