Topic: CSRF Token in Form
$redirect_url = $_SERVER['REQUEST_URI'];
$post_url = forum_link('login.php');
$csrf_token = generate_form_token($post_url);
$form = '
<form id="login" name="login" method="post" action="'.$post_url.'">
<input type="hidden" name="form_sent" value="1" />
<input type="hidden" name="redirect_url" value="'.$redirect_url.'" />
<input type="hidden" name="csrf_token" value="'.$csrf_token.'" />
<input type="submit" name="submit" value="'.$dict->getDict( 'logout', 'login').'">
</form>';
Where is the bug? The error is that the error message from the first post is displayed SOMETIMES when we log in.