Following on from Carl's message. . .
Easy, just treat $_POST as an array and use foreach.
http://www.php.net/manual/en/control...es.foreach.php
Don't forget to make the post values safe before using them if they were
input by the users...
Further don't forget that elements of $_POST may be arrays in their own
right. eg Checkboxes. Here is a snippet of code as illustration
#---------------------------------------------------------------------
function POSTget($VarNam e,$tidy=TRUE){
# read POSTed value from HTTP_POST_VARS
# Normally we'll tidy up the input to remove leading and trailing spaces
and control chars
# but this can be overridden.
#---------------------------------------------------------------------
if (isset($_POST[$VarName])){
$rv = $_POST[$VarName];
if(!is_array($r v)){
if ($tidy) {$rv = TidyInput($rv); }
}
}else{
$rv='';
}
return $rv;
}
--
PETER FOX Not the same since the porcelain business went down the pan
pe******@eminen t.demon.co.uk.n ot.this.bit.no. html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.dem on.co.uk>