Bug #16049 Updated: Hidden Form fields do not POST/GET after include()

From: Date: Wed, 13 Mar 2002 22:04:03 +0000
Subject: Bug #16049 Updated: Hidden Form fields do not POST/GET after include()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-2417@lists.php.net to get a copy of this message
ID: 16049 Updated by: kbritton@appliedmfg.com Reported By: kbritton@appliedmfg.com Status: Open Bug Type: Output Control Operating System: Linux PHP Version: 4.1.2 New Comment: Forgot to add something. The second variable (var2) won't even show up as a form element. If you add a javascript to the bottom of the page that shows the form elements (document.forms[0].var2.value), it doesn't display. Previous Comments: ------------------------------------------------------------------------ [2002-03-13 17:01:18] kbritton@appliedmfg.com Variables set using hidden form fields are not submitted with the form when the <INPUT> tag appears AFTER an include statement. For instance <?php if (isset($var2)) { echo('Var2 = '.$var2); exit(); } echo("<form method='post' action='$PHP_SELF'>"); echo("<input type='hidden' name='var1' value='foo'>"); include ('myfile.php'); echo("<input type='hidden' name='var2' value='baz'>"); echo("<input type='submit'>"); echo("</form>"); ?> ...will not send $var2 on post. Same thing with GET. Var1 comes through ok, though. I've checked the script that is include-d. Var2 is not addressed. Is this just me? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16049&edit=1

« previous php.bugs (#2417) next »