.i have the following code:
session_start(); $host = \'localhost\'; $user = \'root\'; $pw = \'\'; $db = \'pmdb\'; mysql_connect($host,$user,$pw); mys
A potential approach would be:
Fetch the question IDs from the database when you detect a new user/on the 1st question via ORDER BY RAND() LIMIT 5 in SQL.
ORDER BY RAND() LIMIT 5
Store these in the $_SESSION.
$_SESSION
Iterate through the question IDs in the $_SESSION, loading the full question data from the DB via the ID.