Solved

PHP echo Displaying HTML Code, Not Desired HTML Content

Posted on 2012-03-30
3
359 Views
Last Modified: 2012-03-30
In the following page, notice the section "Product Information" http://goo.gl/pRk70

Why won't this content display properly?  It's acting like I've used htmlspecialchars or htmlentities but I haven't.

The database entry is as such:

<font size="1" face="Univers-CondensedLight"><font size="1" face="Univers-CondensedLight">• Easily switches between speakerphone, headset, and handset modes</font></font><p align="LEFT"><font size="1" face="Univers-CondensedLight"><font size="1" face="Univers-CondensedLight">• 32-character LCD display shows number dialed, length of call, and other useful information</p><p>
• 36-entry phone book</p><p>
• 99-number incoming and outgoing call history directories let you easily access past call information</p><p>
• Mute button allows private off-line conversation without other party hearing your conversation</p><p>
• Caller ID with on Call Waiting</p><p>
• Distinctive rings for each line</p><p>
• One-touch speed dial and search/sort speed dialing</p><p>
• Repetitive redial</p><p>
• FSK and expanded PBX message waiting indicator</p><p>
• Nonvolatile RAM protects stored information if power is lost</p></font></font>
0
Comment
Question by:EMB01
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 37789399
You can use htmlspecialchars_decode http://us2.php.net/manual/en/function.htmlspecialchars-decode.php to take care of that part of the problem.  You also have a character set mismatch as shown by the " â€¢ FSK ".  That's usually when you are showing UTF8 characters on a Latin1 page (which you are doing).
0
 
LVL 14

Author Closing Comment

by:EMB01
ID: 37789631
Thanks, this wasn't the whole problem, though.  The other part was that I wasn't allowing special characters into my database (dumb on my part, didn't realize at first).
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37789638
You're welcome, glad you got it fixed.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now