ID: 16049 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Output Control Operating System: Linux PHP Version: 4.1.2 New Comment:
double-check the html that is output by the include file. this almost certainly has nothing to do with php. Previous Comments: ------------------------------------------------------------------------ [2002-03-13 17:04:03] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [2002-03-13 17:01:18] [EMAIL PROTECTED] 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