Re: [PHP] quotes in text.

2004-07-16 Thread Matt M.
> Ok then, I want to know how to do it the right way but just using > $_POST['text'], as stated before, in my query still cuts off the text at > the quote. > > While passing this field between pages I don't do anything to it but when > I want to show it to the user I would use stripslashes($_POST[

Re: [PHP] quotes in text.

2004-07-16 Thread Ed Curtis
On Fri, 16 Jul 2004, John W. Holmes wrote: > Ed Curtis wrote: > > On Fri, 16 Jul 2004, Justin Patrin wrote: > >>This is why he said: "Since you seem to have magic_quotes_gpc enabled, > >>you can put the value directly into your query." > >> > >>You shouldn't use htmlentities when putting it into

Re: [PHP] quotes in text.

2004-07-16 Thread John W. Holmes
Ed Curtis wrote: On Fri, 16 Jul 2004, Justin Patrin wrote: This is why he said: "Since you seem to have magic_quotes_gpc enabled, you can put the value directly into your query." You shouldn't use htmlentities when putting it into the DB. Use it when displaying the text. I tried it both ways and i

Re: [PHP] quotes in text.

2004-07-16 Thread Ed Curtis
On Fri, 16 Jul 2004, Justin Patrin wrote: > This is why he said: "Since you seem to have magic_quotes_gpc enabled, > you can put the value directly into your query." > > You shouldn't use htmlentities when putting it into the DB. Use it > when displaying the text. I tried it both ways and it on

Re: [PHP] quotes in text.

2004-07-16 Thread Justin Patrin
On Fri, 16 Jul 2004 11:58:55 -0500 (EST), Ed Curtis <[EMAIL PROTECTED]> wrote: > > > > On Fri, 16 Jul 2004, John W. Holmes wrote: > > > Let's say you have $_POST['text'] from the user. > > > > To display the value back to the user with magic_quotes_enabled, you'd > > do this: > > > > echo htmle

Re: [PHP] quotes in text.

2004-07-16 Thread Ed Curtis
On Fri, 16 Jul 2004, John W. Holmes wrote: > Let's say you have $_POST['text'] from the user. > > To display the value back to the user with magic_quotes_enabled, you'd > do this: > > echo htmlentities(stripslashes($_POST['text'])); > > To put the value into a hidden form element, you'd do this

Re: [PHP] quotes in text.

2004-07-16 Thread John W. Holmes
Ed Curtis wrote: I'm having some difficulty with quotation marks, both single and double, input via a textarea in a form. Here's and example of text. Trying out the "Special Character" thing. Page 1 is the form. Page 2 is the data shown back to the user. original POST data is not touched. NO strips

[PHP] quotes in text.

2004-07-16 Thread Ed Curtis
I'm having some difficulty with quotation marks, both single and double, input via a textarea in a form. Here's and example of text. Trying out the "Special Character" thing. Page 1 is the form. Page 2 is the data shown back to the user. original POST data is not touched. NO stripslashes origi

[PHP] quotes in text strings

2002-10-02 Thread Javier Montserat
Hi Single quote's in strings entered via a text input field are subsequently appearing with what appears to be an escape character - comm\'ents how can i correct this? I've tried htmlspecialchars($string, ENT_QUOTES); and htmlentities($string, ENT_QUOTES); but these don't seem to work (maybe