ID: 16049 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Output Control Operating System: Linux PHP Version: 4.1.2 New Comment:
Bah! You were right. Turns out the include file had a </form> tag in it. MAN I feel stupid. I just wish I hadn't spent all day trying to fix the frelling thing. Close me out but good. Previous Comments: ------------------------------------------------------------------------ [2002-03-13 17:07:03] [EMAIL PROTECTED] The page outputs fine. The include file parses EXACTLY as it is supposed to....and code BELOW the form element also parses ok (subsequent includes and other html elements). It's just the form element that's affected. Still searching.... ------------------------------------------------------------------------ [2002-03-13 17:05:16] [EMAIL PROTECTED] double-check the html that is output by the include file. this almost certainly has nothing to do with php. ------------------------------------------------------------------------ [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