S.S
S.S

Reputation: 101

How can i post data in to a textarea?

Area <input type="text" name="area" size="15" maxlength="25" value="<?php echo $data2['area'] ?>" /><br /><br />
Description <br /><br /> <textarea rows="8" cols="50" name="description" value="<?php echo $data2['description']?>"></textarea> <br /> <br />

I can post data into the input text from the database but its not working for the text area, this page is for allowing users to update there ads.

Upvotes: 0

Views: 69

Answers (2)

michalk93
michalk93

Reputation: 309

<texarea> HTML element does not have value attribute. Just put your PHP code between <textarea></textarea> like this:

<textarea><?php echo $something ?></textarea>

Upvotes: 1

Razib Al Mamun
Razib Al Mamun

Reputation: 2711

In textarea no need value attribute. Bellow code:

<textarea rows="8" cols="50" name="description"><?php echo $data2['description']?></textarea>

Upvotes: 1

Related Questions