PHP 4.0 Bug #7128 Updated: Decoding of form variables
| From: | Bug Database | Date: | Wed, 11 Oct 2000 06:39:38 +0000 |
| Subject: | PHP 4.0 Bug #7128 Updated: Decoding of form variables | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-34637@lists.php.net to get a copy of this message | ||
ID: 7128
Updated by: rasmus
Reported By: users@freesurf.ch
Status: Closed
Bug Type: PWS related
Assigned To:
Comments:
1. If you did any database work the reason should be obvious.
2. Either use stripslashes() or turn off gpc_magicquotes in your php.ini file.
Previous Comments:
---------------------------------------------------------------------------
[2000-10-11 02:00:13] brad@php.net
This isn't a bug. Use stripslashes() to remove the slashes from the output
---------------------------------------------------------------------------
[2000-10-11 01:50:42] users@freesurf.ch
When receving values from a form text field such as
<INPUT name="hugo" type="text">
any entered ['] is preceedet with an [] in the variable $hugo. Thus:
[it's a shame] becomes "it's a shame".
1. I don't see any reason for it.
2. I tried to solve the problem using preg_replace:
preg_replace('~/'~',''',$hugo);
...without any effect.
preg_replace('~134'~','/',$hugo);
indeed works fine! An error?!
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7128