SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    May 2004
    Location
    Planet Earth
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Does textarea requires special coding?

    Hi

    I have an updating form. But when I pull data from my db it only shows on text fields and not in textareas. I change those textareas to text fields and worked ok.

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Doesn´t work:
    <textarea name="description" value="<?php echo $row['description']; ?>" ></textarea>

    Works:
    <input type="text" name="description" value="<?php echo $row['description']; ?>" >
    - - - - - - - - - - - - - - - - - - - - - - - - - -

    Is there any special coding required for textareas ?

    Thanx 4 any help!


    OK
    "The Internet ? Is that thing still around ?"

  2. #2
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Values for Textarea tags are inbetween the open and close tag:
    PHP Code:
    <textarea name="description"><?php echo $row['description']; ?></textarea>
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  3. #3
    SitePoint Zealot
    Join Date
    May 2004
    Location
    Planet Earth
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You were right. i would never figure. Thanx!
    "The Internet ? Is that thing still around ?"

  4. #4
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You would have figured it out when you found a page that had a text area filled out with saved material (examples available in Sitepoint, Wikipedia, etc.) and looked at the page's source.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •