View Single Post
  #4 (permalink)  
Old 12-01-2007, 08:12 AM
DaveSawers's Avatar
DaveSawers DaveSawers is offline
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 354
DaveSawers RepRank 1
Default Re: How do I store special html codes in a database?

Because then they will always display properly on a web page.

Use htmlentities (in PHP) to encode the strings for storage on the database and then, if you need them translated back again for use elsewhere, use html_entity_decode. Presumably there are ASP.NET equivalents for these PHP functions.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote