I have created a form, quite complex, with user input unique values, integers and strings etc..
The data is posted to a db, and I want an option to allow the user to return and edit their data at any time.
So let’s say we have an input field, with value=”name” and I want the user to be able to return at any time, to alter the value of that field. Which, let’s say, they had previously typed in “Dave”.
What is the best method to re-propagate the form field, with the data they entered previously, from the db, and show that data in an input element and allow them to update the value, to say “David”, and then save the form.
My php coder is away for next few days, and thought I would fiddle with the code whilst I had some spare time.
retrieve the data based on the user, and then just echo the data into the
<input>‘svalue=""attribute for each form element corresponding to the data.<input type="text" name="data-name" id="data-name" value="<?=htmlspecialchars($data-name) ?>" />