Re: apostrophe ( ' ) on a form, adding \; How can i fix this?
| From: | Adam Bregenzer | Date: | Thu, 26 Feb 2004 05:25:24 +0000 |
| Subject: | Re: apostrophe ( ' ) on a form, adding \; How can i fix this? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-178906@lists.php.net to get a copy of this message | ||
On Thu, 2004-02-26 at 00:19, Louie Miranda wrote:
> I have a user/form that client enters data. And one of my clients have an
> apostrophe on his name
>
> eg: Ero's
>
> Now, this page has a confirmation page that the client would see first
> before his form will be directed into my system. Now its shows "Ero\'s" how
> come this is happening? I dont have any filters for this?
Check php.ini, you probably have magic_quotes_gpc[1] enabled, disable
this to remove the backslashes. If you can not edit php.ini or you are
distributing your application and can not control PHP's settings search
the archives for code based solutions to this.
Welcome to the most annoying PHP feature ever. :)
Regards,
Adam
[1] http://www.php.net/ref.info#ini.magic-quotes-gpc
--
Adam Bregenzer
adam@bregenzer.net