View Full Version : putting text into the textarea with PHP

09-25-2005, 04:24 PM
Hi everybody :-)

I am new here. I have had a website for only two months and am trying to learn all the relevant coding. I have a bunch of books but there are some things - lots actually - that are not mentioned at all.

My current problem is to inject some text into a textarea box for the user to edit. The source of the text is onsite and ready. The textarea box is ready. Now I just need to copy the text into the textarea.

Can it be done with PHP?

Julian (-_-)

09-25-2005, 04:40 PM
Kind of confused. A text area in HTML would look like this -

<textarea>Blah blah blah, this is my content.</textarea>

If you wanted to insert a specific value from PHP into there you could do something like -

<?php echo "<textarea>" . $String . "</textarea>"; ?>

09-25-2005, 04:46 PM
Thank you mark87,

That looks promising.

I'll try it now and tell you if it works :-)

Julian (^_^)