[nycphp-talk] Prefill <textarea><?=$variable?></textarea>
Rob Marscher
rmarscher at beaffinitive.com
Sun Nov 6 20:55:31 EST 2011
On Nov 6, 2011, at 6:19 PM, tuon1 at netzero.net wrote:
> <?php
>
> echo "<input><?=$variable1?></input>";
>
This is actually incorrect. The value needs to go in the the value attribute of the input element. Try this:
echo '<input value="' . htmlspecialchars($variable1, ENT_QUOTES, 'UTF-8') . '" />";
> echo "<textarea><?=$variable2?></textarea>";
>
Try this:
echo '<textarea>' . htmlspecialchars($variable2, ENT_QUOTES, 'UTF-8') . '</textarea>';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20111106/77a56496/attachment.html>
More information about the talk
mailing list