Jump to content


Photo

textarea not showing data


  • Please log in to reply
2 replies to this topic

#1 stockton

stockton
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts
  • LocationMidrand South Africa

Posted 24 June 2006 - 11:27 AM

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.
Regards,
Alf Stockton   Programmer for rent.

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 24 June 2006 - 12:09 PM

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.

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

Legend has it that reading the manual never killed anyone.
My site

#3 stockton

stockton
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts
  • LocationMidrand South Africa

Posted 24 June 2006 - 01:00 PM

[!--quoteo(post=387421:date=Jun 24 2006, 02:09 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Jun 24 2006, 02:09 PM) View Post[/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.

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

Thank you. Would you believe I have looked at a missing > for more than a day and never saw it. Thank you again.
Regards,
Alf Stockton   Programmer for rent.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users