Houdini code doesnt change a thing.
He might not have understood this problem.
And if he had run his own code, he would have seen 😃
I didnt think it would workwith htmlspecialchars(), but actually it does!
thanks, Weedpacket
This is my new script
<?php
$text=
'<TEXTAREA rows="4" cols="32">
This is some text.
</TEXTAREA>
This is my code';
if(isset($_POST['txarea']))
$text=$_POST['txarea'];
$text= htmlspecialchars($text,ENT_NOQUOTES);
// display form
echo '<form action="" method="POST">';
echo '<TEXTAREA rows="10" cols="50" name="txarea">';
echo $text;
echo '</TEXTAREA>';
echo '<p><input type="submit"></p>';
echo '</form>';
The resulting HTML output will be:
<TEXTAREA rows="4" cols="32">
This is some text.
</TEXTAREA>
This is my code
... and this will display correctly inside textarea.
.