|
Posted by Toby A Inkster on 01/24/08 09:17
webmasterATflymagnetic.com wrote:
> while (list($name, $value) = each($HTTP_POST_VARS)) {
> echo "$name = $value<br>\n";
> }
This code looks quite archaic. Does $HTTP_POST_VARS really still exist in
recent versions of PHP?
Use $_POST instead.
And while(list($k,$v)=each($quux)) is an overly verbose foreach loop...
foreach ($_POST as $name=>$value)
{
printf("%s="%s"<br>\n",
htmlentities($name),
htmlentities($value));
}
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 24 days, 20:27.]
CSS to HTML Compiler
http://tobyinkster.co.uk/blog/2008/01/22/css-compile/
Navigation:
[Reply to this message]
|