ID: 21696 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: Unknown/Other Function Operating System: Windows XP PHP Version: 4.3.0 New Comment:
First, thanks for your attention. a) I'm running the same script in other machine, and it's passing NULL ("") string. I suppose the other machine, with the same configuration, should have the same behavior. b) Do I have to create the variable? Again, it's running in other machine with no problems. And all of my variables are created in the moment I need them. Did I miss something about PHP? c) I'll test. d) You are right, sorry, I mean register_globals is off e) I'll read. Previous Comments: ------------------------------------------------------------------------ [2003-01-16 16:00:16] [EMAIL PROTECTED] Four things: a) Only checked checkboxes pass values. b) Why do you expect $a to exist at all? I see no code that creates $a. c) Have your test (form2.php) simply be: print_r($HTTP_POST_VARS); d) I believe you mean register_globals is off, there is no such thing as global_variables. e) http://www.php.net/variables.external ------------------------------------------------------------------------ [2003-01-16 15:43:31] [EMAIL PROTECTED] ARGH! actually, ignore that comment... I'm talking bs right now :| ------------------------------------------------------------------------ [2003-01-16 15:39:54] [EMAIL PROTECTED] 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] [EMAIL PROTECTED] (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] [EMAIL PROTECTED] 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