You are here: Re: Is it possible to handle form submission in the same file? « PHP Programming Language « IT news, forums, messages
Re: Is it possible to handle form submission in the same file?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация