Need help outputting data into textarea fields

Posted on 2011-05-01
Last Modified: 2012-05-11
    I have a form which performs a lookup in my database, and displays the logged in users details in textboxes and textareas.  Textareas due to the length of the text.  The text boxes display the data fine with:


However this same method does not work for the textarea fields.  How can I get the text to appear in the textareas.  There are multiple different textareas?

Many thanks

Question by:damianb123
    LVL 82

    Accepted Solution

    The echo needs to go in between the open and close tags in a 'textarea'.
    <textarea rows="6" name="msgText"><?php echo $message; ?></textarea>

    Open in new window


    Author Closing Comment

    Excellent, thanks for your quick response.
    LVL 82

    Expert Comment

    by:Dave Baldwin
    You're welcome, and thanks.

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    What does this mean? 6 27
    PHP Word Writer 1 34
    Database Design Concept 3 32
    mysql sql statement - SQL INSERT INTO SELECT 11 28
    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now