tags:

views:

374

answers:

2

I'm creating a simple back-end app through which the user can create/update/delete database rows (in this case, job listings).

When it comes time for the user to edit an existing listing, I'm trying to pre-fill most of the HTML form with the data from that existing row. I've done this sucessfully for text inputs using the "value" property, and with selects using a bit of php in each option tag: if([conditionforoption]){echo'selected'}.

The input type that I'm having trouble pre-filling is the textarea... any thoughts on how to get the existing data (a long varchar string) to be present in the textarea input when the user loads the page?

I'm trying to stay away from a javascript solution if at all possible, but I'll use it if necessary.

A: 

If your question is, how to fill a textarea:

<textarea>
Here is the data you want to show in your textarea
</textarea>
Tim
+1  A: 
<textarea>This is where you put the text.</textarea>
AGoodDisplayName
Now I feel like an idiot ; ) Thanks for answering a stupid question!
Distill