View Single Post
Old 09-30-2007, 01:02 PM   #12 (permalink)
Karl
The Reckoner
Advanced Programmer Top Contributor 
 
Karl's Avatar
 
Join Date: Sep 2007
Posts: 437
Thanks: 22
Karl is on a distinguished road
Default

An exmaple would be to first set the token as the users cookie:

PHP Code:
$_SESSION['token'] = $iToken;

// Now create the form using this token 
And then on the next page, we simply check:

PHP Code:

if ($_SESSION['token'] !== $_POST['token'])
{
    echo 
'Tut tut, bad boy!.';

You would simply use code like that to check the token.
Karl is offline  
Reply With Quote