Re: StripSlashes() & quotes in text boxes

From: Date: Wed, 16 Jan 2002 09:16:12 +0000
Subject: Re: StripSlashes() & quotes in text boxes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-80672@lists.php.net to get a copy of this message
Hi Robert, > administrator to edit the item description. When displayed in a text box the > description just shows 17. > The only solution I can find is to swap the quote marks for " > when storing the item initially you can use htmlspecialchars() function to convet all the html chars. The issue is, when do you convert it, either when you want to display them on browser, or when user INSERT/UPDATE. I think it's better to convert it only when displaying to the browser. so in the DB, the data is still stored as it is, because you might want to display the data somewhere else other than browser, for example email or printing. -- Jimmy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All work and no pay makes a housewife.

« previous php.general (#80672) next »