Variables not being passed

From: Date: Thu, 28 Dec 2000 20:05:11 +0000
Subject: Variables not being passed
Groups: php.windows 
Request: Send a blank email to php-windows+get-4714@lists.php.net to get a copy of this message
I'm using PHP v4.0.1pl2 on Win98 SE (just for development). I was just starting to play with passing form variables and found that they are not being passed. Or, more accurately, they're not getting picked up by the page I'm sending them to. Here's the code of the page with the form: <html> <head> </head> <body bgcolor=white> <form method=post action=getinfo.php> <input type=text name=stuff size=15 maxlength=30><br> <input type=submit> </form> </body> </html> And here's the code for getinfo.php: <html> <head> </head> <body bgcolor=white> <?php print("$stuff"); ?> </body> </html> When the first page calls getinfo.php nothing shows up. So, I added the following code to see what's getting passed in the POST: <?php while (list($var, $value) = each($HTTP_POST_VARS)) { echo "$var = $value<br>\n"; } ?> And sure enough I get output like: stuff = blablabla So, it looks like the var is being passed, but the page isn't picking it up. What am I doing wrong? Thanks! - larry

« previous php.windows (#4714) next »