Re: Strings in text fields are bad
| From: | Simon Edwards | Date: | Tue, 26 Sep 2000 04:13:03 +0000 |
| Subject: | Re: Strings in text fields are bad | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-17513@lists.php.net to get a copy of this message | ||
Maxim Maletsky wrote:
> Stop, Stop, Stop Guys ...
> Why not to teach this guy doing it simplier:
>
> $caddress = '12345 Abc Ave.';
> echo '<input type=text name=caddress value="' . $caddress .
> '">';
Also now would be a good time to explain why wrapping htmlspecialchars()
around the variables in the echo statement are a good idea if you want
to avoid a nasty surprise in the future. (what happens to the HTML when
$caddress contains a string with a ' in it?)
Is it just me who is paranoid about these encoding issues?
--
Simon Edwards
Animated Design, Melbourne
http://www.animated.net.au/ Ph: (03) 98850990