|Why are escape characters (\) appearing in one form field but not in another?||#1|
I've been building a database input form. There are three fields for notes. They were all build at the same time. They have the same logic & class system - but one of them is returning with escape marks when I update the record, e.g. I enter
and the updated record returns
I'm confused as the other return the text as formatted. Can you sugggest why this is happening?
posted date: 2008-12-18 10:15:00
|Re: Why are escape characters (\) appearing in one form field but not in another?||#3|
As it is, your question lacks a lot of crucial information. Obviously, if everything is done identically, the data will be the same as well. Additionally, you probably don't mean that there are escape marks in your data (or do you?). In that case, you must have explicitly called a function to convert line breaks into a string containing the characters
.Lacking any code, I assume that you display your data differently; once using a normal
and once using something like
posted date: 2008-12-18 10:20:00
|Re: Why are escape characters (\) appearing in one form field but not in another?||#4|
When you say you have 3 fields for notes, are they all HTML <textarea> tags? Or are two of them HTML <input type="text"> and the one you are having trouble with is a <textarea> tag?
posted date: 2008-12-18 11:10:00
|Re: Why are escape characters (\) appearing in one form field but not in another?||#5|
As Konrad suggested your question lacks clarity. Are they both on the same page? If not, do both pages have the same
?The simplest solution to this is to handle it regardless,
s.The other scenario you have to handle is a
to a page that has errors (e.g repopulated with post values). You must make sure that the
value is the 'stripped' version of the slashes else you will double up on the addslashes; so only addslashes when all your post validation and verification has been completed.
posted date: 2008-12-19 04:34:00
|select page: « 1 »|