You are here: $_POST problems « PHP Language « IT news, forums, messages
$_POST problems

Posted by Isaac Hunt on 09/26/86 11:36

Hi

I'm trying to get variables POSTed from a form. What I'm looking for is a
way of getting all variables in one shot. The form contains (amongst other
things) the following lines:-

<input type="hidden" name="action" value="checknew">
<input size="50" name="emai1" value="<? echo $email; ?>">

I'm trying to read them back in using:-

foreach($_POST as $key => $value)
{
# $this->$key = $value;
echo "$key = $value<br>\n";
}

This is showing all the vaiables without a problem but if I put the
following straight after I get nothing

echo " ACTION = ".$action;

Adding a $action=$_POST[action];
works fine.
Is there a simple way to get all the variables without doing a $_POST[] for
each one? That's a bit long winded if there's 80 plus to read in.
register_globals is off.


--
Isaac Hunt
Possibly the most handsome man here?

 

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

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