[thelist] field checking in PHP
Martin Kuplens-Ewart
martin at takingitglobal.org
Mon Dec 17 22:41:26 CST 2001
Of course, this does not integrally support the echoing of unfilled form
fields... To do that you would have to...:
For each of your fields in sequence as below... (where $field1 is
replaced with the name of the variable, and erm, Field1Name is replaced
with the name of the form field (OneWord):
if ($field1)
{
$check[Field1Name] = 1
$checkint .= 1;
}
###############################
# do checking, etc
###############################
if ($checkint > 0 && $checkint < 13)
{
echo ("The Following fields were left blank:<br>\n");
foreach ($check as $key => $value)
{
echo($key."\n");
}
}
Then do the rest of your processing as normal. :)
-m
More information about the thelist
mailing list