You are here: Re: Double quotes in text input « PHP Programming Language « IT news, forums, messages
Re: Double quotes in text input

Posted by Bob on 10/20/06 15:51

Kimmo Laine wrote:
> "Bob" <bobr@whidbey.com> wrote in message
> news:1161307446.321192.22730@i42g2000cwa.googlegroups.com...
> >I accept text, add_slashes, and store it in my MySQL DB. When I display
> > the text, I normally strip_slashes and also strip_tags. This all works
> > excepts for a field with double quotes. e.g.
> >
> > "My Book's Title" is very simple
> >
> > When I display this field, it is totally blank. What's the solution?
>
> I suppose html_entities("My Book's Title"); would do the trick.
>
> If you have an input like <input type="trext" value=""My Book's Title"", the
> html parser assumes the value="", empty quotes, thus the totally blank input
> field.

Thanks Kimmo - you explained the problem AND found the solution.
htmlentities worked!

 

Navigation:

[Reply to this 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

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