0

Possible Duplicate:
How to add default value for html <textarea>?

I am using ajax to send data from the form to the database and I have probem:

<input class="input" type="text" name="do_kogo" id="odbiorca" size="25" value="<?php print $odbiorca; ?>" />
<input class="input" id="temat" type="text" name="temat" size="25" value="<?php print $temat; ?>"/>
<textarea id="tresc_area" name="tresc" cols="45" rows="10" ></textarea>

As you can see I am changing the values to php equivalent and I don't know how can I change the value of the textarea to put there <?php print $tresc; ?>Please help me if somebody know how to do this. I would be so grateful.

Community
  • 1
  • 1
Michael D
  • 83
  • 2
  • 11

1 Answers1

4

You can add value in between <textarea> starting and ending tag.

<textarea id="tresc_area" name="tresc" cols="45" rows="10" ><?php print $tresc; ?></textarea>
Dr. Dan
  • 2,288
  • 16
  • 19
  • ahh I thought about that and tried it. I realise my problem wasn't here. Thanks for the answer @Dr. Dan – Michael D Dec 17 '12 at 08:19