Re: [PHP] how to fight backslash in char variable???

2002-08-20 Thread Michael Sims

On Tue, 20 Aug 2002 15:13:53 +0300, you wrote:

the problem is that from out.php I need to echo this $intext but I get:

blablabla \' blablabla

the question is.. how to fight this backslash out of there?

The magic_quotes_gpc setting is enabled on your server.  If you have
access to the server config, I would suggest disabling it (I find it
to be a huge pain).  If you don't, but can place PHP directives in
.htaccess files, you can disable it on a per-directory basis.  If that
option is unavailable, you'll be forced to use the stripslashes()
function on data that comes from get, post, or cookie.

HTH

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




Re: [PHP] how to fight backslash in char variable???

2002-08-20 Thread Jason Wong

On Tuesday 20 August 2002 20:13, Maris Kalnins wrote:
 Hi guys!

 Situation:

 $intext = blablabla ' blablabla;
 then this $intext is passed to out.php (as parameter out.php?intext=...)

 the problem is that from out.php I need to echo this $intext but I get:

 blablabla \' blablabla

 the question is.. how to fight this backslash out of there?

If you want to disable this behaviour:

  php.ini - magic_quotes_gpc

Otherwise use stripslashes()

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
The idle mind knows not what it is it wants.
-- Quintus Ennius
*/


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