Jump to content

textarea not showing data


stockton

Recommended Posts

Please tell me why the following php code does not work.
<form name=Message ID=Message action=messageUpdateProcess.php?UID=<?php echo $intID ?> method=post>
Message:
<textarea rows=6 cols=80 name=Message ID=Message wrap=physical <?php echo $txtMessage ?></textarea>
$txtMessage even though populated with data never appears in the textarea.
The previous line <?php echo $intID ?> works fine.
Link to comment
https://forums.phpfreaks.com/topic/12797-textarea-not-showing-data/
Share on other sites

I have no idea why each element of your form has the same name and the same ID (and ID is most likely redundant), but the reason why the textarea displays nothing is because your coding was incorrect. The below should work.

[code]<textarea rows='6' cols='80' name='Message' ID='Message' wrap='physical'> <?php echo $txtMessage; ?></textarea>[/code]
[!--quoteo(post=387421:date=Jun 24 2006, 02:09 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Jun 24 2006, 02:09 PM) [snapback]387421[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I have no idea why each element of your form has the same name and the same ID (and ID is most likely redundant), but the reason why the textarea displays nothing is because your coding was incorrect. The below should work.

[code]<textarea rows='6' cols='80' name='Message' ID='Message' wrap='physical'> <?php echo $txtMessage; ?></textarea>[/code]
[/quote]

Thank you. Would you believe I have looked at a missing > for more than a day and never saw it. Thank you again.

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.