with your code structure - no, but you can preprocess $_POST.. this approach is not very nice, but if you fill out your forms ONLY like in the example, it's going to work.
$parametersToPreprocess = array(
'text1',
'text2',
);
foreach (array_keys($_POST) as $postKey) {
if (in_array($postKey, $parametersToPreprocess)) {
$_POST[$postKey] = htmlentities($_POST[$postKey]);
}
}
kgb
2010-06-25 12:23:40