Reply to Re: help : apostrophe/single quotation mark

Your name:

Reply:


Posted by Erwin Moller on 03/06/07 10:05

dajava wrote:

> Hi,
>
> Sorry for this beginner's question.
> I do not know PHP
> and write for my friend.
>
> He has never been a professional programmer.
> He studied C and PHP with some books
> and made a bulletin board for his hobby homepage.
> (He uses MS-Windows XP)
>
> Now, the problem is:
>
> Writing a message
> and previewing is OK.
> But, after posting, all the words including and after ' (apostrophe/
> single quotation mark) disappear.

Well, you didn't give enough information, so we cannot help really.
Some questions:

What is writing a message excactly?
Is that filling in some HTML-form that is submitted to a server?

What is previewing a message excactly?
Is that some JavaScript or does it include a trip to the server?

If so: what does the server do with it?
- some possibilities: Store it in a database, echo it back, store it in a
file.

And then: WHERE do these characters disappear? In a form? or as HTML?

A wild guess:
You write back to the client:
<input type="text" name="whatever" value='I can't do that'>

That is wrong.

If you need " or ' in your response back to the client, make sure you call
htmlentities() around the literal part you send back as value (or in any
other inputelement-value, also textareas).

Regards,
Erwin Moller


>
> Examples are,
>
> --------------------------
>
> I can't do that
>
> ==> I can
>
> --------------------------.....................
>
> The person named 'Jim' is smart.
>
> ==> The person named
> -----------------------------.............
>
> Any hints?
>
> dajava,

[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

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