By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,779 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,779 IT Pros & Developers. It's quick & easy.

How to retrieve a text from my DB and display it in textarea

P: 5
Hi all ^^

i want to display a text that i have in my DB in textarea, so, i use a query to select that text from the database and it work fine.
then i use the following statment:

Expand|Select|Wrap|Line Numbers
  1.  Print " <textarea name='bio' maxlength='370'  id='bio' rows='10' cols='44' name='bio' value=".$info['bio'] ." > </textarea> "; 
but it dose not work!! and i get the textarea empty!:(((

P.S: i used
Expand|Select|Wrap|Line Numbers
  1.  Print $info['bio']; 
and my text printed ok ^^

i think it something wrong with my using "value" ! but i couldn't find any other why.

any aides??

thank you so much ^^ <3
Feb 28 '12 #1

✓ answered by Dormilich

that's because a textarea does not have a value attribute (though its DOM representation has a value property). put the text between start and end tag.

Share this Question
Share on Google+
3 Replies


Dormilich
Expert Mod 5K+
P: 8,639
that's because a textarea does not have a value attribute (though its DOM representation has a value property). put the text between start and end tag.
Feb 29 '12 #2

P: 5
thank you so much ^^
i am really thankful for your help <3333
Mar 1 '12 #3

P: 93
Expand|Select|Wrap|Line Numbers
  1. <textarea><?php echo $row['your_text_filed_name']; ?></textarea>
Apr 16 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.