form text box not showing data

Discussion in 'PHP' started by lektrikpuke, Jul 3, 2008.

  1. #1
    I have a form with a text box that I want prepopulated with data. When I look at the source of the generated page, the data is there, it's just not showing in the text box. Please help. :eek:

    echo "<FORM ACTION=\"modify_search_fields.php\" METHOD=POST>";
    echo "<p><input type=hidden name=\"id\" value=\"".$id."\" /></p>";
    echo "<p><b>Search Terms:</b>&nbsp;&nbsp;<textarea name=\"search_keywords\" cols=\"60\" rows=\"10\" value=\"".$search_keywords."\"></textarea></p>";
    echo "<p>&nbsp;<input type=\"submit\" name=\"submit\" value=\"Modify Record\"></p><br />";
    echo "<input type=\"hidden\" name=\"check\" value=\"modify\" />";
    echo "</FORM>";
     
    lektrikpuke, Jul 3, 2008 IP
  2. serialCoder

    serialCoder Guest

    Best Answers:
    0
    #2
    the value of the textarea is not put in the value attribute, its instead placed in between the textarea tags

    example
    <textarea>value here</textarea>
     
    serialCoder, Jul 3, 2008 IP
  3. lektrikpuke

    lektrikpuke Well-Known Member

    Messages:
    297
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    113
    #3
    Thanks, that did it. Funny how a little thing like that can make you crazy. :D
     
    lektrikpuke, Jul 3, 2008 IP
  4. serialCoder

    serialCoder Guest

    Best Answers:
    0
    #4
    i fall onto the same traps once in a while :cool:
     
    serialCoder, Jul 3, 2008 IP