Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-12-2012, 10:24 PM   PM User | #1
Eggweezer
New Coder

 
Join Date: May 2012
Posts: 99
Thanks: 77
Thanked 0 Times in 0 Posts
Eggweezer is an unknown quantity at this point
How do I display data from a table in a textarea

I am pulling a variable (which is actually a long string) from a dbase table, and trying to display it in a "textarea" in a form.

It does work, BUT... it does not display it as a textarea as you would expect with 10 rows and 100 columns.

It just displays as only 1 row of about 20 columns. Why does it not display as a "textarea"? All the data is inside there (if you scroll to the right).

Please help me! Thank you.

Here is my line of code:
[icode]
<input type="textarea" cols="100" rows="10" id="paragraph" name="paragraph"value="<?php echo $paragraph; ?>" />
[/code]

PS: I'm sorry, I was not sure how to display the code with the [code] & [icode]

Last edited by Eggweezer; 12-12-2012 at 10:27 PM..
Eggweezer is offline   Reply With Quote
Old 12-12-2012, 10:33 PM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,249
Thanks: 59
Thanked 3,999 Times in 3,968 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Ummm...because you forgot your basic HTML?

Code:
<textarea cols="100" rows="10" name="paragraph"><?php echo $paragraph; ?></textarea>
Usually no point to giving a <textarea> an id. The name is usually all that is needed.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
Eggweezer (12-12-2012)
Old 12-12-2012, 10:38 PM   PM User | #3
Eggweezer
New Coder

 
Join Date: May 2012
Posts: 99
Thanks: 77
Thanked 0 Times in 0 Posts
Eggweezer is an unknown quantity at this point
Duh! I guess am tired tonight.

Thank you very much Old pendant.
Eggweezer is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:51 AM.


Advertisement
Log in to turn off these ads.