Re: placing values in html teaxtarea

From: Date: Mon, 12 Jul 2004 16:05:05 +0000
Subject: Re: placing values in html teaxtarea
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-190254@lists.php.net to get a copy of this message
Keith Greene wrote:
Here is what I tried: <textarea name="zoutput" rows="20" cols="70" wrap value="<? echo $test; ?>" /> </textarea>
textareas do not use the value attribute. instead, the value is placed between the <textarea></textarea> tags: <textarea name="zoutput" rows="20" cols="70" wrap /><? echo $test; ?></textarea>
Ensure you run $test through htmlentities() or htmlspecialchars() before placing it in your <textarea> like this to prevent code injection. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#190254) next »