RE: [PHP] Help with PHP and HTML
| From: | Jay Blanchard | Date: | Thu, 26 Sep 2002 13:15:38 +0000 |
| Subject: | RE: [PHP] Help with PHP and HTML | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117717@lists.php.net to get a copy of this message | ||
[snip]
When we are at it let's don't forget htmlspecialchars
<input name="cliemail" type="text" size="48" value="<?echo
htmlspecialchars($clil); ?>"
readonly>
skitum wrote:
>hey folks, don't forget quotes ;o)
>
><td><input value="<? echo $cost; ?>" name="txtSubTotalAmount"
>size="40"
>readonly></td>
[/snip]
Well now we have gone too far! :^] In the original post the variable was
$cost. But let's not forget addslashes() or stripslashes(), unless, of
course, magicquotes is on, and then if register_globals is off then;
<input name="cliemail" type="text" size="48" value="<?echo
htmlspecialchars($_POST['clil']); ?>"
readonly>
or
<input name="cliemail" type="text" size="48" value="<?echo
htmlspecialchars($_GET['clil']); ?>"
readonly>
:^]
Jay
*****************************************************
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conference Center *
* New Braunfels, Texas *
* Contact jay.blanchard@niicommunications.com *
* *
* Want to present a paper or workshop? Contact now! *
*****************************************************