Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.


Results 1 to 2 of 2

Thread: filling textarea with php variable

  1. #1

    filling textarea with php variable

    I'm trying to create an update form for blog entries and to populate the form i have it all working except for the text area because there is no value= for textareas. here is the php code.
    PHP Code:

    $id $_GET['b_id'];

    $query "SELECT * FROM blog WHERE b_id = $id";
    $resultmysql_query($query) or die(mysql_error());

    '<form action="new_blog.php" method="post">
        <p>Title: <input type="text" name="title" value="'
    .$row[1].'" size="30" maxlength="200"/> </p>
        <p>Location:<input type="text" name="location" value="'
    .$row[2].'" size="30" height="40"> </p>
        <p>Entry: <textarea wrap="virtual"name="entry" cols="75"rows="10"maxlength="100">'
    .$row[3].'</textarea> </p>
        <p>Map Point: <input type="text" name="b_locpoints" value="'
    .$row[5].'"size="4" maxlength="3"/> </p>

        <p><input type="submit" name="submit" value="Submit" /></p>
        <input type="hidden" name="submitted" value="TRUE" />
        <input type="hidden" name"id" value="'

    everything else echo out fine but the text area keeps giving me errors such as
    Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in .... on line17

  2. #2
    Never mind, fixed it

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012