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:
        include_once"../conn.php";

        
    $id $_GET['b_id'];

    $query "SELECT * FROM blog WHERE b_id = $id";
    $resultmysql_query($query) or die(mysql_error());
    $row=mysql_fetch_array($result,MYSQL_NUM);

    echo 
    '<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="'
    .$id.'"/>
    </form>'

    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

 Credits

Copyright 1999 - 2012