<form action="action.php" method="POST">
<input type="hidden" name="H[name]" value="<?php echo $Oname?>"/>
<input type="hidden" name="H[age]" value="<?php echo $Oage?>"/>
<?php $sign = md5('name'.$Oname.'age'.$Oage.$secret); ?>
<input type="hidden" name="hash" value="<?php echo $sign?>"" />
</form>
<?php
$str = "";
foreach($_POST['H'] as $key=>$value) {
$str .= $key.$value;
}
if($_POST['hash'] != md5($str.$secret)) {
echo "Hidden form data modified"; exit;
}
?>