Reply to Displaying database contents on the web

Your name:

Reply:


Posted by FP on 07/06/06 20:38

I have a comments field in my database that I want on the web.
I put some weird characters in for testing.
When I had <b> in the comment field it turned all text after that bold.
I tried using htmlspecialchars() & htmlentities() but then I got
"&#8221;" instead of a quote.

The code I'm using to display the text in HTML is:
<TD>
<P><FONT SIZE="+1">
<? echo(htmlentities($ResultOne['Comment'][0])); ?>
</FONT></P>
</TD>

Do I need to change the HTML code or is there a PHP function that will
handle all weird characters in this situation? Please keep in mind I'm
fairly new to this, so if there's an obvious answer just point me in
the right direction.

P.S.
Someone had suggested using a regex function but I couldn't find that
in my manual, I assumed they were referring to the htmlspecialchars()
function.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация