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
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]
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.