Re: Problems Posting!

From: Date: Tue, 22 Oct 2002 13:42:40 +0000
Subject: Re: Problems Posting!
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-16469@lists.php.net to get a copy of this message
You must use list($key, $value) exactly as is; if you want to rename your key/ value variables for clarity (which you certainly should do), do it just after: also better use $_POST: while (list($key, $value) = each($_POST)) { $name = $key ; HTH Ignatius ____________________________________________ ----- Original Message ----- From: "James Meers" <jambo@venda.com> To: <php-windows@lists.php.net> Sent: Tuesday, October 22, 2002 3:28 PM Subject: [PHP-WIN] Problems Posting! > Below is a script i am running, the if and else statements dont seem to be working, it doesnt seem to be picking up the passed values even though the script i have below picks it up. > > Would it have anything to do with the way i have installed PHP? i am running Windows 2000 server, with PHP 4 > > Any help would be appreciated > > Cheers > > James > > <?php > if (isset($mode)) { > echo"PASSED VALUES:<br>"; > while (list($name, $value) = each($HTTP_POST_VARS)) { > echo "$name = $value<br>\n"; > } > } else { > echo" > <form action=\"test_script.php\" name=\"test\" id=\"test\"> > <input type=\"hidden\" name=\"mode\" value=\"test\"> > <input type=\"text\" name=\"email\"><br> > <input type=\"submit\" name=\"submit\" value=\"submit\"> > </form> > > > "; > } > echo"DEFAULT VALUES:<br>"; > while (list($name, $value) = each($HTTP_POST_VARS)) { > echo "$name = $value<br>\n"; > } > ?> > >

« previous php.windows (#16469) next »