Increment a hidden form field so that you can keep count with every submission. Once they exceed the limit, you can do:
<?php
if (isset($tries) && $tries > 3) {
header("location: /lockout.htm");
} else {
if (!isset($tries)) {
$tries = 1;
} else {
$tries++;
}
}
?>
...form...
<input type=hidden name=tries value=<%=$tries;%>>
...end form...
Dave
===========================================
http://badblue.com/helpphp.htm
Free small footprint web server for Windows
PHP, P2P file-sharing, transcoding and more