Re: [PHP] Re: Escaping '

2011-07-22 Thread Richard Quadling
On 22 July 2011 16:56, Geoff Lane  wrote:
> On Friday, July 22, 2011, Floyd Resler wrote:
>
>> I did a fresh install of PHP on a new server.  I had gotten used to
>> PHP automatically adding a backslash before single quotes when form
>> data is submitted.  It seems that is shut off in my new install.
>> How do I turn it back on?
>
> Check the manual for 'Magic Quotes GPC':
> http://php.net/manual/en/security.magicquotes.php
>
> However, you may want to rething enabling this as it's deprecated and
> judging by the discussions I've seen it will be removed in the not too
> distant future.
>
> HTH,
>
> --
> Geoff

Geoff, more like the dim and distance past
http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/NEWS?r1=313575&r2=313574&pathrev=313575

Welcome to the future!

-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Escaping '

2011-07-22 Thread Geoff Lane
On Friday, July 22, 2011, Floyd Resler wrote:

> I did a fresh install of PHP on a new server.  I had gotten used to
> PHP automatically adding a backslash before single quotes when form
> data is submitted.  It seems that is shut off in my new install.
> How do I turn it back on?

Check the manual for 'Magic Quotes GPC':
http://php.net/manual/en/security.magicquotes.php

However, you may want to rething enabling this as it's deprecated and
judging by the discussions I've seen it will be removed in the not too
distant future.

HTH,

-- 
Geoff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: escaping PHP's closing tags

2002-03-27 Thread Erik Price


On Wednesday, March 27, 2002, at 12:03  PM, Julio Nobrega Trabalhando 
wrote:

>   Haven't seen it either, but you could use:
>
> echo '<' . '?';
>
>   So < is separated from ?. Or ? from > for the matter.

That's a good workaround.  I'll use that until I hear from above.


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: escaping PHP's closing tags

2002-03-27 Thread Julio Nobrega Trabalhando

  Haven't seen it either, but you could use:

echo '<' . '?';

  So < is separated from ?. Or ? from > for the matter.

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


"Erik Price" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi -- I'm trying to use a string of XML data which includes the use of
> the  tags.  I've noticed that my editor (BBEdit) shows that \?>
> will escape the tag so that PHP does not treat it as a true "close the
> PHP code" tag, but was hoping that someone here could give me an
> official ruling.
>
> There is no reference to escaping the ?> tag on the man page (currently)
> that I could find, or in the annotations.
>
>
> Erik
>
>
>
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Escaping a double-quote problem

2002-02-01 Thread Anton Kolev

oh yes

and I had some magic_quote_=Yes parameter set by default in php.ini :)

it's really not very smart to use it, it's very misleading
one can see hundreds websites, which fill s with backslashes on
re-submit to the same form

"Lerp" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Look up addslashes and stripslashes in the manual. Normally you'd use
> addslashes going into the db, and stripslashes coming out for display.
> HTH Joe :)
>
>
> "Anton Kolev" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Any idea why when I print the value of $text, I get a backslash in front
> of
> > the result?
> >
> > $text=preg_replace("/\"/", """, $text);
> > $text=preg_replace("/\"/", "A", $text);
> > $text=str_replace("\"", "A", $text);
> >
> > Contrary:
> >
> > $text=preg_replace("/&/", "&", $text);
> >
> > works quite well.
> >
> > cheerz
> >
> >
> >
>
>



-- 
PHP General 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] Re: Escaping a double-quote problem

2002-02-01 Thread Lerp

Look up addslashes and stripslashes in the manual. Normally you'd use
addslashes going into the db, and stripslashes coming out for display.
HTH Joe :)


"Anton Kolev" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Any idea why when I print the value of $text, I get a backslash in front
of
> the result?
>
> $text=preg_replace("/\"/", """, $text);
> $text=preg_replace("/\"/", "A", $text);
> $text=str_replace("\"", "A", $text);
>
> Contrary:
>
> $text=preg_replace("/&/", "&", $text);
>
> works quite well.
>
> cheerz
>
>
>



-- 
PHP General 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]




RE: [PHP] Re: escaping special characters upon submit

2001-08-25 Thread Navid Yar

Try this:

$text = nl2br(htmlspecialchars(stripslashes($text)));

With $text being the data outputted. It will replace apostrophes, quotes,
etc. with their proper html formatting.

Example: input: "PHP is Cool!"
   html output: "PHP is Cool!"

Then if you don't want the $quot;, or whatever is outputted depending on the
input, you can write a script to strip them out if you like. There are lots
of things you can do from this point. Anyway, hope that helps you out...

Navid


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 25, 2001 2:49 PM
To: Sunil Jagarlamudi; [EMAIL PROTECTED]
Subject: [PHP] Re: escaping special charecters upon submit


> I have a form that submits data to a database, works great until
someome
> puts in an apostrophe in the comments area...how do i escape this
> charecter upon
> insert?





--
PHP General 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 General 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]




Re: [PHP] Re: escaping special charecters upon submit

2001-08-25 Thread idesign

> mine always says ask don" lol...actually got it figured out right after muy 
last post "rawurlencode" worked great

Thanks though!


> On 26-Aug-2001 [EMAIL PROTECTED] wrote:
> > Tried addslashes also urlencode, neither worked...
> > 
> > the input is from a comment area in a form...that adds data to a mysql 
> > database...the comments contain commas and apostrphes, that 
when 
> > you try to subit, screw up the execution of the insert
> > 
> > Any help would be very very very very appreciateddriving me nuts.
> > 
> > 
> 
> The Ouji board:  'check line 47' (but then it always sez that).
> How about posting some code ?
> 
> Regards,
> -- 
> Don Read   [EMAIL PROTECTED]
> -- It's always darkest before the dawn. So if you are going to 
>steal the neighbor's newspaper, that's the time to do it.
> 
> -- 
> PHP General 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 General 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]




Re: [PHP] Re: escaping special charecters upon submit

2001-08-25 Thread Don Read


On 26-Aug-2001 [EMAIL PROTECTED] wrote:
> Tried addslashes also urlencode, neither worked...
> 
> the input is from a comment area in a form...that adds data to a mysql 
> database...the comments contain commas and apostrphes, that when 
> you try to subit, screw up the execution of the insert
> 
> Any help would be very very very very appreciateddriving me nuts.
> 
> 

The Ouji board:  'check line 47' (but then it always sez that).
How about posting some code ?

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General 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]




Re: [PHP] Re: escaping special charecters upon submit

2001-08-25 Thread idesign

Tried addslashes also urlencode, neither worked...

the input is from a comment area in a form...that adds data to a mysql 
database...the comments contain commas and apostrphes, that when 
you try to subit, screw up the execution of the insert

Any help would be very very very very appreciateddriving me nuts.


> http://www.php.net/manual/en/function.addslashes.php
> That should work fine.
> -Andy
> <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > I have a form that submits data to a database, works great until
> > someome
> > > puts in an apostrophe in the comments area...how do i escape this
> > > charecter upon
> > > insert?
> >
> >
> >
> >
> 
> 
> 
> -- 
> PHP General 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 General 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] Re: escaping special charecters upon submit

2001-08-25 Thread Andy Ladouceur

http://www.php.net/manual/en/function.addslashes.php
That should work fine.
-Andy
<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I have a form that submits data to a database, works great until
> someome
> > puts in an apostrophe in the comments area...how do i escape this
> > charecter upon
> > insert?
>
>
>
>



-- 
PHP General 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] Re: escaping special charecters upon submit

2001-08-25 Thread idesign

> I have a form that submits data to a database, works great until 
someome 
> puts in an apostrophe in the comments area...how do i escape this 
> charecter upon
> insert?





-- 
PHP General 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]