#38771 [NEW]: string POST data are converted to int
| From: | satanas at tech-at dot be | Date: | Sun, 10 Sep 2006 18:12:05 +0000 |
| Subject: | #38771 [NEW]: string POST data are converted to int | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-101966@lists.php.net to get a copy of this message | ||
From: satanas at tech-at dot be
Operating system: Apache 10336100
PHP version: 4.4.4
PHP Bug Type: Unknown/Other Function
Bug description: string POST data are converted to int
Description:
------------
When submitting a form that contain a string value and defined as text,
the POST variable is displayed as a integer.
When filling the form with a text, the POST value is 0, when filling the
form with ex 1234, the POST value is 1234.
But strange is another form in the HTML page work perfectly
Reproduce code:
---------------
The Form that works:
<form name='shearch' id='shearch'
action='/modules/mpmanager/contbox.php?op=sendbox&send=1&onglet=1'
method='post'>
<table width='100%' class='outer' cellspacing='1'>
<tr><th colspan='2'>Trouver un utilisateur</th></tr>
<tr valign='top' align='left'><td
class='head'>Recherche</td><td
class='even'><input type='text' name='user' id='user'
size='25'
maxlength='50' value='' />
<input type='submit' class='formButton' name='submit'
id='submit'
value='Trouver un utilisateur' />
</td></tr>
<tr valign='top' align='left'><td
class='head'>Choix</td><td
class='even'>Les mots clés de moins de 3 caractères seront ignorés
</td></tr>
</table>
</form>
The form that create the issue:
<form name='read' id='read'
action='/modules/mpmanager/contbox.php?send=0'
method='post'>
<table width='100%' class='outer' cellspacing='1'>
<tr><th colspan='2'>Ajouter un Contact</th></tr>
<tr valign='top' align='left'><td
class='head'>Contact(s)</td><td
class='even'><input type='text' name='to_userid'
id='to_userid' size='25'
maxlength='50' value='' />
Séparer par une , Maximum 3 Utilisateur(s)
</td></tr>
<tr valign='top' align='left'><td
class='head'></td><td
class='even'><input type='reset' class='formButton'
name='reset'
id='reset' value='Vider' />
<input type='submit' class='formButton' name='post_messages'
id='post_messages' value='Soumettre' />
</td></tr>
</table>
Expected result:
----------------
on the form that create the issue
if mhm is submitted
to_userid=mhm (string(3))
post_messages= Soumettre (string(9))
Actual result:
--------------
on the form that create the issue
if mhm is submitted
to_userid=0 (int(0))
post_messages= Soumettre (string(9))
if 1234 is submitted
to_userid=int(1234)
post_messages= Soumettre (string(9))
--
Edit bug report at http://bugs.php.net/?id=38771&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38771&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38771&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38771&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38771&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38771&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38771&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38771&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38771&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38771&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38771&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38771&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38771&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38771&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38771&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38771&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38771&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38771&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38771&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38771&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38771&r=mysqlcfg