I've looked up for some solutions, and I think that the best one is to set a hidden input named postcheck which contains a random md5 number, and check it against the current session, and of course that it will change in every page load.
The code here is just a small example which I haven't tested, but it'll maybe help with thinking of a good implementation.
- Code: Select all
if( ($_SESSION['postcheck'] != $_POST['postcheck']) )
{
return false;
} else {
return true;
}
Thanks.