one simple php/mysql question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ekosoftco
Forum Contributor
Posts: 108
Joined: Fri Aug 04, 2006 8:21 pm

one simple php/mysql question

Post by ekosoftco »

this is probably a dumb question, but ive searched for a good hour on it. I store all my page data in a database, and i was wondering how to put html tags like bold or images into the database, so when they get pulled and displayed on the page, it shows the image or tag correctly.
what i do is do a query, result, row, and pull the row with the text onto the page in php. every time it has a tag in it though, it simple shows the tag, like "<b>" instead of making it bold.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Sounds like you're automatically pushing the data through htmlspecialchars() or htmlentities().
ekosoftco
Forum Contributor
Posts: 108
Joined: Fri Aug 04, 2006 8:21 pm

Post by ekosoftco »

thanks :)
Post Reply