Jump to content

Didplay into a textarea


firedrop84

Recommended Posts

[!--quoteo(post=358524:date=Mar 26 2006, 09:46 AM:name=toplay)--][div class=\'quotetop\']QUOTE(toplay @ Mar 26 2006, 09:46 AM) [snapback]358524[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Example:

... name="var_name" value="<?PHP echo $my_value; ?>" ...

Look into perhaps using htmlentities() depending on what you're putting in the value area:

[a href=\"http://us3.php.net/htmlentities\" target=\"_blank\"]http://us3.php.net/htmlentities[/a]
[/quote]


I may be incorrect on this, so catch me if I am toplay. But I didnt think you could declare a "value=" for a text area. I know you can with a text input field. See the snippet below:

[code]
    <body>
        <P>My Text Field</P>
        <P><INPUT id="Text1" type="text" name="Text1" value="<? echo $solution; ?>"></P>
        <P> </P>
        <P>My Text Area</P>
        <P><TEXTAREA id="Textarea1" name="Textarea1" rows="2"                 cols="20"><? echo $myvar; ?></TEXTAREA></P>
    </body>
[/code]

As I said, I may be wrong, but I have never been able to use the "value=" parameter for a TEXTAREA. This always works.
Link to comment
https://forums.phpfreaks.com/topic/5846-didplay-into-a-textarea/#findComment-21638
Share on other sites

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]As I said, I may be wrong, but I have never been able to use the "value=" parameter for a TEXTAREA. This always works.[/quote]Beacuse the textare tag is not part of the <input> tag family and so has an opening and closing tag just like the paragraph tag.
Link to comment
https://forums.phpfreaks.com/topic/5846-didplay-into-a-textarea/#findComment-21641
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.