Hi All,

Hopefully easy question...

I have a form that allows the user to view what exists in the database, modify the information & submit updates. All modifications are writing to the database correctly. However, I have a field that is minimum 200+ characters that I want to display in a textarea box instead of text field so that most of the information is visible. However, when the form is pulled up, the textarea field is blank, even though the information DOES exist in the database.

Anybody know where I'm going wrong?

END;
echo '<TEXTAREA name="ir_notes" rows="4" cols="35" value="'.$row["ir_notes"].'">'.'</textarea>';
echo <<<END

Thanks in advance for your help!

    When using the <TEXTAREA> tag you must put the value of the tag between the start and ending tags.

    ex:

    <textarea name='test' rows='5' cols='30'>Fill in the text here</textarea>

    Ciao

    Roberto Piazza

      textarea does not take a value atribute like most other form elements, instead you need to place the text in between the <textarea> and </textarea> tags like this ...

      $ir_notes = $row["ir_notes"];
      echo "<textarea name='ir_notes' rows='4' cols='35'>$ir_notes</textarea>";

        thank you both for your help!

          Write a Reply...