[PHP-DEV] PHP 4.0 Bug #7128 Updated: Decoding of form variables From: Bug Database (php-dev <email protected>)
Date: 10/11/00

ID: 7128
Updated by: rasmus
Reported By: users <email protected>
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 <email protected>
This isn't a bug. Use stripslashes() to remove the slashes from the output

---------------------------------------------------------------------------

[2000-10-11 01:50:42] users <email protected>
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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>