#21696 [Opn]: Checkbox is strange in POST event
| From: | tularis@php.net | Date: | Thu, 16 Jan 2003 21:43:32 +0000 |
| Subject: | #21696 [Opn]: Checkbox is strange in POST event | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-30301@lists.php.net to get a copy of this message | ||
ID: 21696
Updated by: tularis@php.net
Reported By: ivanpisa@dfm.ffclrp.usp.br
Status: Open
Bug Type: Unknown/Other Function
Operating System: Windows XP
PHP Version: 4.3.0
New Comment:
ARGH! actually, ignore that comment... I'm talking bs right now :|
Previous Comments:
------------------------------------------------------------------------
[2003-01-16 15:39:54] tularis@php.net
I'm not sure if it'll make any difference, but try changing this line:
echo '<input type=checkbox name=married value="s">';
since ' is not supported as a valid HTML quote (that is, I THINK it
isn't :S)
------------------------------------------------------------------------
[2003-01-16 15:29:28] ivanpisa@dfm.ffclrp.usp.br
(continue)
In fact, the error is simplier: when I run
<?
echo $a;
?>
in machine 1, it's ok!! But in machine 2, it returns
Notice: Undefined variable: a in test.php on line 2
Any clues???
Thanks
------------------------------------------------------------------------
[2003-01-16 15:26:17] ivanpisa@dfm.ffclrp.usp.br
I'm using PHP 4.3.0 as ISAPI in 2 WinXP machines, running Apache
2.0.43. PHP was installed at same folders and I'm using the same
PHP.INI. In machine 1, everything works great. In machine 2, everything
works great too BUT when I'm using checkbox inside form posting:
echo "<form method=post action=form2.php>";
echo "<br>Are married?";
echo "<input type=checkbox name=married value='s'>";
echo "</form>";
the form2.php is:
<?
echo "<html><body>";
$married = $HTTP_POST_VARS["married"];
echo "married = ".$married;
echo "</body></html>";
?>
the response is:
Notice: Undefined index: married in form2.php on line 2
In machine 1, forms with checkbox are working great, but in machine 2,
it doesn't. Any ideas?? PHP.INI is the same, global_variables are OFF.
Thanks in advance
Ivan Pisa
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21696&edit=1