#44647 [Opn->Bgs]: Different values in $_POST and $REQUEST for name 'cp'
ID: 44647
User updated by: emilt at tot-consult dot com
Reported By: emilt at tot-consult dot com
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: Windows XP
PHP Version: 5.2.5
New Comment:
Sorry, stupid of me!
I had
if ($_POST['cp'] = 'ASCII')
instead of
if ($_POST['cp'] == 'ASCII')
Previous Comments:
------------------------------------------------------------------------
[2008-04-05 18:22:00] emilt at tot-consult dot com
Description:
------------
I have a form with two radio buttons:
input type=radio name='cp' value='ASCII'
input type=radio name='cp' value='ANSI'
When the form is submitted with method POST, $_POST['cp'] is always
'ASCII' regardless of the selected button. $_REQUEST['cp'] is always
correct, and so is $_GET['cp'] if the method is changed to GET.
This doesn't happen if the name of the control is different than 'cp'.
Using latest Apache 2.2.8
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44647&edit=1
Thread (2 messages)