kevinritt Posted August 21, 2009 Share Posted August 21, 2009 I have web page content (including html, css classes, ids and divs) stored in the database. When I call the page I get strange characters and css is not working. Here's an example of what I get on the page: Basic knowledge of how to use a camcorder to videotape your event. Step by step breakdown on camcorder use, and do�s and don�ts of camera operations. Training will cover the following: Battery and AC use and applications (1 HR.) * Tape loading * Basic Auto settings for immediate recording * Camera movement (do�s and don�ts) o Panning left to right o Zooming in and out * Tripod use, mounting, adjusting for smoothness o Don�t over torque fittings I am using the 'Longtext' type in the database field for the content. Is there a way to get the correct html, css rendered? Link to comment https://forums.phpfreaks.com/topic/171253-storing-displaying-html-css-in-mysql-database/ Share on other sites More sharing options...
phpdeveloper82 Posted August 21, 2009 Share Posted August 21, 2009 I am not sure.. but please try this: Before storing the data to table, use this function: $data = htmlentities(your_data); While displaying use html_entitty_decode() Link to comment https://forums.phpfreaks.com/topic/171253-storing-displaying-html-css-in-mysql-database/#findComment-903065 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.