i have a session variable $_SESSION[‘random’] and a page home.php .home.php contain a div which are auto refresh and show a random number and this number put into $_SESSION[‘random’] array .again any number pull from range 1 to 50 and put into $_SESSION[‘random’] variable .
my question is that if any user1 is open home.php and 10 number are pull from range and put into $_SESSION[‘random’] ,if any user2 open that page hoem.php then this colud not start from initial, user2 also have 10 number as they are pullout .
if will possible in session and if then how to ?
i have a session variable $_SESSION[‘random’] and a page home.php .home.php contain a div
Share
you should store the last number pulled into the database and assign the +1 no to the next user,if the number is >50 than reset it back to zero.
without using database you cannot perform this