Simply and REALLY dirty:
<?php
session_start();
//you would also need to check that both variables have been set
if ($_POST['hash']===$_SESSION['hash'])
{
//usual validation and data cleansing
}
else
{
echo 'Validation failed please try again!';
}
//set a session containing a hashed unique key
$_SESSION['hash'] = md5(time().rand(0, 50000));
?>
<form action="" method="post">
<fieldset>
<!-- your usual form fields -->
<input type="hidden" name="hash" value="<?=$_SESSION['hash']?>" />
</fieldset>
</form>
Ideally you would also be using SSL to reduce the risk of session hijacking.