I want to make a exercice's page (for learning) where every refresh push a random entry from database. The code WORKS fine in localhost but not in the server. In server, for some reason, it push every time the same entry.
$query="SELECT basics FROM exercices ORDER BY RAND() LIMIT 1";
$result=mysqli_query($dbc, $query) or die ("Error of query".mysqli_error($dbc));
$row=mysqli_fetch_array($result);
$exercice=$row['basics'];
DBclose($dbc);
Sequence of pages: mainpage -> exercices_page (where php&mysql push exercice from DB) submit value to -> update script that update student puntuation and turn back to exercice's page with 'header('Location...'). At exercice's page, it should refresh with a new random exercice. But every time it's the same.
I don't understand why it happens in server if works in local. I try with 3 browsers, and each display a different entry but not changes the result. By the way: update script also update and sum the exercices made in the student profile, but the browser display the same value until new login in the page.
I'm stuck because I don't know if the problem is program or same server configuration.