I have a question about html form fields. I’m trying to create a form to allow users to edit their profile. I want the form to have their information already in the fields when they access the page. So like Username [ken] Address [12345] City [NJ]. Then the user can edit any info they want and what they don’t want to edit will have their old information sent along with their new info. I’d like to know how I can put their info in the form fields.
I apologize if my question has been answered before but I’m not sure how to word it so it’s difficult to search for.
Thank you.
Essentially all you’re trying to do is add a value to the field.
will set the the text that is in the field when it loads to “hello”. For php you’d simply be using
Or at least something similar, depending on your exact needs.
For this particular example, try something similar to:
The reason I’m using json_encode in this particular example is that it will print to the source in quotes, rather than doing some muddling ‘”‘.$variable type nonsense.