Although my case was targeted specifically at forms and inputs, your
question depends on how your application would write to the text file. 

When an HTML entity is retrieved from the database and put into the VALUE of
an INPUT box or put inbetween TEXTAREA tags, the HTML entity is left encoded
in the source code, but it is translated into the quote mark character when
the page is viewed. 

So if you were to fetch a database record, put its values on a form, and hit
a submit button to save it to a text file immediately, the text file would
contain the quote marks, not the HTML entities. That's why I find this all
very useful. I am able to convert the entity just before I insert data into
the database. Once I retrieve it, in most cases the entity will be
translated anyway by the browser. Not sure if that's confusing, but that's
the best way I can think of to explain it right now...

- Jonathan

-----Original Message-----
From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 05, 2002 12:07 AM
To: Bogdan Stancescu; Jonathan Hilgeman
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Fixed Quote Marks in Inputs


I just read your thread and I have to say that I was intrigued both by
the subject (which is interesting) and by the different views you show.

I just have one question for Jonathan :

If you store the ' and " as ' and " what do you do if you need
to show the data later on in a non HTML format (text file for example).
Wouldn't you still need to convert back to ' and " before you show the
text?

Sincerely

      berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


-----Original Message-----
From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 05, 2002 1:44 AM
To: Jonathan Hilgeman
Cc: '[EMAIL PROTECTED]'
Subject: Re: [PHP-DB] Fixed Quote Marks in Inputs


Ok, seems like I misjudged you and I apologize for that.

I haven't changed my opinion about the very issue we've been discussing
- only
wanted to post the sentence above, just for the record.

Bogdan

Jonathan Hilgeman wrote:

> Apparently, the experienced way is to store them with slashes, which
is what
> I've followed for years. I consider years of programming to be a fair
amount
> of experience, thus qualifying me to be experienced. ANYHOW, after
finally
> thinking a bit outside the box and with some valuable input from some
> co-workers, we came up with this function which is a much more
efficient
> solution in this matter than the "experienced" way you proposed.
>
> My purpose in even posting this function was so that other people
could
> avoid having to go through the same problems I faced when using the
"proper"
> and apparently "experienced" method that I only used because I
listened to
> programmers like you (mind you, I said LIKE you, not YOU) who believe
in
> standard procedure in all cases without considering more efficient
options.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to