Re: Has anyone else seen this problem on php4.01 patch level 2?
| From: | Troels Arvin | Date: | Wed, 19 Jul 2000 22:59:31 +0000 |
| Subject: | Re: Has anyone else seen this problem on php4.01 patch level 2? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7354@lists.php.net to get a copy of this message | ||
ray@skygo.com wrote:
> When I call...
>
> http://mahi:9080/echo.php?text=ray%27s+car
>
> it outputs:
> ray\'s car
>
> i'm expecting:
> ray's car
Yes, isn't it annoying. Your server probably has the PHP feature "Magic
Quotes GPC" turned off. The feature is good for in-experienced PHP-users
because it eliminates some potential SQL security problems. But's it's a
pain in the a** if you know when to use addslashes() and don't want PHP
to mess with your variables.
You have to options:
1. turn of Magic Quotes GPC, or
2. run stripslashes() on all incoming data.
--
Greetings from Troels Arvin, Copenhagen, Denmark