note 12132 deleted from function.ereg-replace by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 01:56:25 +0000 |
| Subject: | note 12132 deleted from function.ereg-replace by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20207@lists.php.net to get a copy of this message | ||
I've noticed that a lot of posts on here refer to problems with unwanted or unnecessary
backslashes being added to your form inputs. I saw some workarounds that dealt with this problem
using regular expression matching and replacement, but no real solution to the problem. I had the
same problem with my web host.
Since my host runs Apache, I was able to completely fix this problem by adding the following line to
my .htaccess file:
php_flag magic_quotes_gpc off
This turned off that dumb "magic quote" processing. I apologize to the person who invented
it, but it's more of a hindrance than a help. If I want slashes, I'll just use
addslashes().
REMEMBER: You still have to use htmlspecialchars() if you're repasting form inputs back into
the value parameters of an HTML form. ;-)