Ask a Question related to PHP Development, Design and Development.
-
Heinz #1
text received via POST
Hi All
I am sending a textarea field via POST to a form.
What happens is that all occurences of ' " and & in the text received via
$_POST[] in that form are now preceded by a \
What is causing this and how can I avoid it ?
I would like to receive the text as seen in the textarea field.
I am using php 4.2.1
Thanks in advance
Heinz
Heinz Guest
-
Text to post to page
I am looking for a way to allow a user to change a message on a webpage. It would work like this. the user goes to a page with a text area and... -
LWP POST - source page received istead of data
Hello Group, I am new to perl world and especially html. I'm trying to get data from my http server. But instead of expected data I get source... -
Lost Post: Scroll text document with photo
I have a pdf document (text with a photo) that was made in word on a mac. I want the user to be able to view the document and scroll it in the... -
Post Script - Hylafax - Text File - perl
I want to write a script that takes piped input and then fills out a purchase order form that can then be sent to Hylafax as a postscript file. ... -
Rich Text Editor with POST?
I just downloaded the cross-browser rich text editor from Kevin Roth. http://www.kevinroth.com/rte/demo.htm Sample fo the html code: <!--... -
Shawn Wilson #2
Re: text received via POST
Heinz wrote:
Try stripslashes().>
> Hi All
>
> I am sending a textarea field via POST to a form.
>
> What happens is that all occurences of ' " and & in the text received via
> $_POST[] in that form are now preceded by a \
>
> What is causing this and how can I avoid it ?
>
> I would like to receive the text as seen in the textarea field.
>
> I am using php 4.2.1
>
> Thanks in advance
> Heinz
Regards,
Shawn
--
Shawn Wilson
[email]shawn@glassgiant.com[/email]
[url]http://www.glassgiant.com[/url]
Shawn Wilson Guest
-
Kevin Thorpe #3
Re: text received via POST
Heinz wrote:
$plaintext = stripslashes($text);> Hi All
>
>
> I am sending a textarea field via POST to a form.
>
> What happens is that all occurences of ' " and & in the text received via
> $_POST[] in that form are now preceded by a \
>
> What is causing this and how can I avoid it ?
>
> I would like to receive the text as seen in the textarea field.
>
> I am using php 4.2.1
>
> Thanks in advance
> Heinz
They're being added automatically by your php settings to protect you
from SQL insertion attacks.
Kevin Thorpe Guest
-
Michael Fuhr #4
Re: text received via POST
Kevin Thorpe <kevin@pricetrak.com> writes:
....specifically, by the setting of magic_quotes_gpc, which you can check>> > I am sending a textarea field via POST to a form.
> >
> > What happens is that all occurences of ' " and & in the text received via
> > $_POST[] in that form are now preceded by a \
> >
> > What is causing this and how can I avoid it ?
> >
> > I would like to receive the text as seen in the textarea field.
> >
> > I am using php 4.2.1
> $plaintext = stripslashes($text);
>
> They're being added automatically by your php settings to protect you
> from SQL insertion attacks.
by calling get_magic_quotes_gpc(). It's a good idea to make this
check before calling addslashes() or stripslashes() on form data
to find out if altering the data is necessary. If you neglect to
make this check, then the code will probably misbehave if the setting
of magic_quotes_gpc is ever changed.
--
Michael Fuhr
[url]http://www.fuhr.org/~mfuhr/[/url]
Michael Fuhr Guest
-
Heinz #5
Re: text received via POST
"Heinz" <lullundlall@yahoo.com> wrote in message
news:bpfu9b$1nhcig$1@ID-25174.news.uni-berlin.de...Thanks to ALL of you for helping me here.> Hi All
>
>
> I am sending a textarea field via POST to a form.
>
> What happens is that all occurences of ' " and & in the text received via
> $_POST[] in that form are now preceded by a \
>
> What is causing this and how can I avoid it ?
>
> I would like to receive the text as seen in the textarea field.
>
> I am using php 4.2.1
>
> Thanks in advance
> Heinz
>
>
>
I use now :
if (get_magic_quotes_gpc())
$text=stripslashes($text);
and it works :-)
Cheers
Heinz
Heinz Guest



Reply With Quote

