Editing in text field on a form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
JimPMM
Forum Newbie
Posts: 1
Joined: Tue Jun 25, 2002 5:10 am
Location: UK

Editing in text field on a form

Post by JimPMM »

I have a simple news snippet admin area. I want to be able to update an item by having the existing text (pulled from a mySQL database table field) displayed directly in the form text area on the edit page, then obviously updated when the user hits 'Submit'.
At the moment, the contents of the field have to be displayed on the page, and any adjustments mean that the whole item needs to be re-typed into the (blank) form text area.
Any help would be greatly appreciated!
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

If you put the information between the <textarea> tags it will be displayed in the box.

Code: Select all

<textarea name="fieldname">$info_from_database</textarea>
Mac
Post Reply