Jump to content

Archived

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

stockton

textarea not showing data

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.

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites
[!--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.

Share this post


Link to post
Share on other sites

×

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.