-4

I have the following code in my form

<input style="height:80px;width:232px;font-size:20px" maxlength="250" name="address" type="text" value="<?php echo $address;?>" />

It works fine and value in $address is showing in the text field. But I need to replace the text field to text area.For that I wrote the following code,

 <textarea style="height:80px;width:232px;font-size:20px" maxlength="250" name="address" value="<?php echo $address;?>" ></textarea>

But this code shows no values. Please help me.

Abhik Chakraborty
  • 44,654
  • 6
  • 52
  • 63

2 Answers2

3

Use below:

<textarea style="height:80px;width:232px;font-size:20px" maxlength="250" name="address"><?php echo $address;?></textarea>
Rahul Kaushik
  • 1,454
  • 8
  • 16
0

Your textarea is not proper , You need to insert your message between the opening and closing tags.

<textarea><?php echo $address; ?></textarea>

Wit Wikky
  • 1,542
  • 1
  • 14
  • 28