From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.1.2
PHP Bug Type:     Output Control
Bug description:  Hidden Form fields do not POST/GET after include()

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 bug report at http://bugs.php.net/?id=16049&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16049&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16049&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16049&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16049&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16049&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16049&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16049&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16049&r=submittedtwice

Reply via email to