Is there some kind of caching issue?
I've sql statement which updates column in mysql.
$mysqli->query("UPDATE users SET user_sessions = user_sessions +1, user_password_token = ". mt_rand(1000000000,9999999999) ." WHERE user_name = '". $mysqli->real_escape_string($user_name) ."' AND user_password = '". $mysqli->real_escape_string($user_password) ."'");
In db I see token gets update only few times in every 5 refresh. And mostly it gets same values! Bits the idea of random doesn't it?
Number that gets repeated is mystic: 4294967295.
So is php caching this function?
I also noticed if I output mt_rand with echo this problem disappears.
:S
p.s. wait, is my browser not refreshing page? But this would not explain repeated number anyways.