I have a form with a textarea tag. Text is entered in the textarea, then displayed for confirmation. If the user wants to edit the data, it uses a post to send the data back to the form entry.
The data comes thru to the display fine. When sent back to the form entry, the textarea tag truncates anything in the string after the first space.
I've tried various combinations of nl2br, htmlentities, and ereg_replace, with no luck.
How can I display the whole string in the textarea box for editing?
I've removed a lot of code to try and simplify & show only the pertinent parts.
// at the confirmation display
$status = '
You have entered the following:<br>
Description: ' .$desc. ' <br>
<p>
If you need to change something click
<form action = ' . ($PHP_SELF) . ' method=post>
<input type=\'hidden\' name=\'desc\' value='.$desc.'></form> ';
echo $status;
// at the re-entry for edit section
$status = '
<FORM ACTION= ' . ($PHP_SELF) . ' METHOD=POST>
Product Name<br>
<p>Description<br>
<textarea name=\'desc\' cols=\'40\' rows=\'3\' wrap=\'soft\'>'.$desc.'</textarea></form>';
echo $status;