Re: Reading Form Fields...
| From: | c | Date: | Wed, 21 May 2003 22:07:57 +0000 |
| Subject: | Re: Reading Form Fields... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148460@lists.php.net to get a copy of this message | ||
> > I guess this question has been posted before, but I am new to the list..
> >
> > How can I process a batch of form fields?
> > Instead of naming every single variable is it possible to get every
> > variable out with a 'while'?
while (list($key, $value) = each ($_POST))
{
if ($key!="x" && $key!="y")
{
$value=strip_tags($value);
$body=$body . $key . ": " . $value . "\n";
}
}
This takes all the variables and puts them in a variable that you can
send via email. The X and Y are for the coordinates ofthe send buton,
when you use an image. Is that it? bye.