Doyle has asked for the wisdom of the Perl Monks concerning the following question:

In my Admintest.pl, I have several textarea controls within the script that are assigned a value but the value never prints out within the textarea. I know there is a value in the textarea (from database). Here is one of the print statements in my script...
print "<td><textarea NAME=\"reh_dinner_site_addins_lang\" value=\"@row +[50]\" ROWS=\"4\" COLS=\"46\"></textarea></td>";
Is there some sort of formatting I must do before I put the value into the textarea? Thanks for everyone's help in advance...

Replies are listed 'Best First'.
Re: Printing the contents of a textarea
by moot (Chaplain) on Mar 10, 2005 at 16:35 UTC
    Did you perhaps mean:
    ... value=\"$row[50]\" ...
    Also, textareas don't have values. Enclose the data within the textarea tags:
    <textarea>$row[50]</textarea>
    (surrounding attributes removed for clarity).
Re: Printing the contents of a textarea
by Joost (Canon) on Mar 10, 2005 at 16:36 UTC
Re: Printing the contents of a textarea
by jZed (Prior) on Mar 10, 2005 at 16:54 UTC
    print "<td><textarea NAME=\"reh_dinner_site_addins_lang\" value=\"@row +[50]\" ROWS=\"4\" COLS=\"46\"></textarea></td>";
    Please do yourself a favor and never use backslashes to escape double quotes in HTML, it's impossible to read. Use here-docs or plain qq{} and q{}, for example:
    print qq{ <td> <textarea NAME="reh_dinner_site_addins_lang" ROWS="4" COLS="46" >$row[50]</textarea> </td> };
      It is working.... Thanks guys, your are the best!