navid3d_69
دوشنبه 19 فروردین 1392, 22:58 عصر
مشکل این token چیه؟ شرط کار نمی کنه و لی session و مقدار token یکی هست
$token_key = rand(0, 999);
$token_key .= time();
$token_key = md5($token_key);
$token_key = md5($token_key);
$_SESSION['token_key'] = $token_key;
echo $_SESSION['token_key'];
echo '<br>';
echo $token_key;
if($_SESSION['token_key'] == $_POST['token_key']){
echo 'navid';
}
echo '<form method="post" action="">';
echo '<div class="formfield">';
echo '<input type="submit" name="Submit_Register" id="Submit_Register" class="Submit_Button" value="' . _Register_ . '" />';
echo '</div>';
echo '<input name="token_key" type="hidden" id="token_key" value="' . $token_key . '" />';
echo '</form>';
$token_key = rand(0, 999);
$token_key .= time();
$token_key = md5($token_key);
$token_key = md5($token_key);
$_SESSION['token_key'] = $token_key;
echo $_SESSION['token_key'];
echo '<br>';
echo $token_key;
if($_SESSION['token_key'] == $_POST['token_key']){
echo 'navid';
}
echo '<form method="post" action="">';
echo '<div class="formfield">';
echo '<input type="submit" name="Submit_Register" id="Submit_Register" class="Submit_Button" value="' . _Register_ . '" />';
echo '</div>';
echo '<input name="token_key" type="hidden" id="token_key" value="' . $token_key . '" />';
echo '</form>';